Skip to content
Discussion options

You must be logged in to vote

Both work. Recommended: keep the generators out of your source tree and pin them through npx in your build hook, so public/ is always fresh:

{ "scripts": {
  "seo": "npx -y github:RelayStack/astro-seo-toolkit astro-seo-llms --dir src/content --site https://example.com --out public/llms.txt && npx -y github:RelayStack/astro-seo-toolkit astro-seo-sitemap --dir src/content --site https://example.com --out public/sitemap.xml",
  "build": "npm run seo && astro build"
} }

Three details that matter:

  1. Point --dir at the content collection (src/content/...), not src/pages — otherwise drafts and components leak into the sitemap.
  2. Titles/descriptions come from frontmatter. Pages without frontmatter f…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by RelayStack
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant