Repository navigation
Conversation
- Generate opensaas.sh/llms.txt in the Vite build instead of an npm predeploy hook, so it's included whichever deploy command is used. It was missing in production and the SPA fallback served HTML instead. - Add sitemap.xml to the template and opensaas.sh, and reference it from robots.txt. - Add robots.txt to the docs, pointing at the Astro-generated sitemap. - Document robots.txt and sitemap.xml in the SEO and deploying guides.
| + "scripts": { | ||
| + "generate-llms-txt": "node ./scripts/generate-llms-txt.mjs", | ||
| + "predeploy": "npm run generate-llms-txt", | ||
| + "deploy": "REACT_APP_GOOGLE_ANALYTICS_ID=G-H3LSJCK95H wasp deploy fly deploy", |
There was a problem hiding this comment.
GA doesn't work on opensaas.sh right now (I think the site's code says "Google Analytics ID is missing"). Probably the same cause as the llms.txt bug: only npm run deploy adds the GA ID, and the last deploy didn't use it.
Does it make sense to fix the GA ID the same way (if it's actively being used), or always deploy opensaas.sh with npm run deploy?
I don't think it's urgent, as Plausible still works, but it might be something to clean up.
| Disallow: /account | ||
| Disallow: /admin | ||
|
|
||
| Sitemap: https://your-saas-app.com/sitemap.xml |
There was a problem hiding this comment.
A nit, but if a template user forgets to change this line, search engines get sent to your-saas-app.com. It's in the deploy checklist, so this is probably fine as is.
|
So, generally this all looks good and covers the llms.txt, sitemap, and robots.txt fixes from my previous list. I think we just need to redeploy opensaas.sh after the merge, and then opensaas.sh/llms.txt should show a text file, not the app. I left several smaller comments inline, nothing huge there. |
Description
Fixes a few crawler/agent discoverability defects on opensaas.sh and the docs.
public/llms.txtin an npmpredeployhook, so deploys that ranwasp deploy fly deploydirectly shipped without it and the SPA fallback answered instead. It's now emitted by a small Vite plugin invite.config.ts, so it's part of every client build regardless of deploy command. The generator script now just exportsgenerateLlmsTxt(); thegenerate-llms-txt/predeployscripts and the.gitignoreentry are removed.public/sitemap.xmlto the template (placeholder domain,/and/pricing) and to the demo app (opensaas.sh URLs), and aSitemap:line to bothrobots.txtfiles.blog/public/robots.txtpointing to the Astro-generatedsitemap-index.xml.I considered a sitemap generator (e.g.
vite-plugin-sitemap), but Wasp routes live inmain.wasp.ts, so you'd still list public routes by hand, plus carry an extra dependency. A static file is simpler for template users to edit.Testing
wasp build+npx vite build, as the Railway/Fly client builds do) and confirmedbuild/containsllms.txt(with blog posts),sitemap.xml, androbots.txtwith the Sitemap line../opensaas-sh/tools/diff.shregeneratedapp_diffcleanly; prettier passes.After merging, opensaas.sh needs a redeploy for the llms.txt/sitemap fix to go live.
Contributor Checklist
app_diffregenerated