Skip to content
Early bird + Black Friday · 73% off

Get ZeroDirs for $179 $49

Claim $49 deal

Programmatic SEO

Programmatic SEO turns your listings into pages. features.pseo and pseo.enabled default to true; the copy is pseo.templates in site.config.ts, empty in a fresh config.

  1. Add an entry to pseo.templates; the id picks the pattern.

    site.config.ts
    pseo: {
    enabled: true,
    maxPages: 2000,
    templates: [
    {
    id: 'best-category-for-tag',
    enabled: true,
    minItems: 3,
    maxItems: 24,
    title: 'Best {category} {nouns} for {tag} ({year})',
    description: 'The {count} best {category} {nouns} for {tag}.',
    h1: 'Best {category} {nouns} for {tag}',
    intro: 'We compared {count} {nouns}, starting with {topNames}.\n\nEvery {noun} is tagged {tag}.',
    faq: [{ q: 'How were these picked?', a: 'Reviewed by a human.' }],
    },
    ],
    },

    pnpm check:config answers site.config.ts OK — <name> (<url>); …; an unknown placeholder or repeated id fails, naming the field.

  2. Build, and read the generator’s lines.

    Terminal
    pnpm build
    pseo: generated N (dropped by minItems M, truncated K)
    seo-report: … pseo N pages (best-category-for-tag=A, name-alternatives=B)

    N pages, M candidates below minItems, K non-zero only above pseo.maxPages.

  3. Open https://<your domain>/best-<category>-for-<tag>/, or dist/client/best-<category>-for-<tag>/index.html in the build.

    The demo’s /best-writing-for-long-form/ page: breadcrumb, h1, intro, the item list, the FAQ and the sibling links

  4. https://<your domain>/sitemap-pseo-0.xml lists the generated URLs; absent when there are none.

Where You should see
The count build output pseo: generated N (dropped by minItems M, truncated K), N above 0
A page /best-<category>-for-<tag>/ your h1, intro, one card per listing, the FAQ, “Related guides”
The other direction any listing page “Appears in”, linking the pages that list it
The sitemap /sitemap-pseo-0.xml one <loc> per page
Coverage build output seo-report: categories without pSEO coverage: none
  • The ids: best-category-for-tag → /best-{category}-for-{tag}/, minItems 3; name-alternatives → /{name}-alternatives/, 2; free-category → /free-{category}-{nouns}/, 3, off by default.
  • Two templates making the same slug keep the first; a slug colliding with a reserved segment, route base, category, tag or listing is dropped as [zerodirs:pseo] skipped "<slug>".
  • A maxItems above 24, the ItemList ceiling, is clamped and reported.
  • Placeholders are the SEO ones plus {pricing} and {topNames} — see Registries. intro is plain text: a blank line starts a paragraph, no Markdown renders.
  • src/content/pseo/<slug>.md overrides one page: its body replaces the intro, its title or description the meta. The FAQ is copy only, no FAQPage schema.
Config state The visitor sees Fix
features.pseo: false or pseo.enabled: false no pages, no “Appears in”; the report says pseo 0 pages (disabled) set both true
one template enabled: false its pages gone, the rest stay set it true, or delete it
minItems above the data few or no pages; a large dropped by minItems M, and seo-report: categories without pSEO coverage: naming the categories lower minItems, or tag more listings
the file budget 80% of the plan limit warns, 90% fails: Cut files (seo.ogScope, fewer pSEO templates, fewer listings) fewer templates, seo.ogScope.pseo: false; Cost and limits

/admin/ reports nothing for any of these.

features.pseo, pseo.enabled, pseo.maxPages, pseo.templates[], seo.templates.pseo and seo.ogScope.pseo — features, pseo, seo. Both switches have to be on; the template list can stay in the file while the feature is off.

  • Directorysrc/
    • Directoryfeatures/pseo/
      • index.ts
      • patterns.ts
      • generate.ts
      • copy.ts
    • templates/PseoPage.astro
    • Directorycomponents/pseo/
      • …
    • Directorycontent/pseo/
      • …
  • site.config.ts