Skip to content

Add Astro llms.txt plugin to template/blog (follow-up after Astro 5+ upgrade) #682

Description

@vincanger

Context

In #679 we added a static template/app/public/llms.txt placeholder so users have a curated, customizable index for AI/LLM crawlers (per llmstxt.org). That covers the app/marketing side.

For the blog & docs (template/blog/), the right approach is to use an Astro integration so llms.txt (and ideally llms-small.txt / llms-full.txt) gets auto-generated from the Starlight content at build time — saving users from writing/maintaining a generator script.

Why this is a follow-up

The maintained Astro llms.txt plugins all require Astro 5+ / Starlight 0.31+:

Plugin Astro peer dep
starlight-llms-txt (delucis) ^5.1.6 (all versions)
@4hse/astro-llms-txt ^5.1.6 || ^6.0.0
astro-llms-txt (codiume) ^5.0.0

The template blog is currently on Astro 4.16.15 / Starlight 0.29.2, so none install cleanly. The Astro 6 / Starlight 0.38 / Tailwind 4 upgrade is already in flight in #647 — this task should land after that merges.

Scope

  • Pick a plugin. Recommended: starlight-llms-txt since it's Starlight-aware and generates llms.txt, llms-small.txt, and llms-full.txt from content collections automatically
  • Install and configure in template/blog/astro.config.mjs
  • Verify it generates expected files on npm run build
  • Update the SEO guide to describe the auto-generated blog/docs llms.txt (currently only the app-side static file is documented)
  • In opensaas-sh: optionally migrate from the existing custom generate-llms-txt.mjs script to the same plugin for consistency (separate decision, addressed in Add llms.txt and JSON-LD schema markup to opensaas.sh #679 PR review thread)

Blocked by

Related

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions