Astro Themes & Starters

Astro for Documentation Sites: Starlight, Structure, and When Docs Deserve Their Own Site

18 November 2026 · Updated 28 November 2026 · 12 min read · by Yang Kai

Build documentation with Astro and Starlight: what Starlight includes, its honest limits in 2026, how to structure docs readers can navigate, and when docs deserve their own site.

Checklist inside: Docs Site Starter Checklist (Astro + Starlight)

Contents
  1. What Starlight is, and what it includes
  2. The honest limits, checked November 2026
  3. How far you can bend the design
  4. Starlight versus rolling your own docs
  5. Structuring docs people can navigate
  6. Search, versions, and the details that separate real docs
  7. When docs deserve their own site
  8. The docs site starter checklist
  9. How we researched this
  10. What to do next

A documentation site built from scratch spends its first month on plumbing: sidebar, search, code blocks, dark mode, a table of contents. None of that is your documentation. It is the furniture documentation sits in, and building it yourself means the writing starts a month late.

The fast route in the Astro ecosystem is Starlight, the Astro team’s own documentation theme. It hands you the furniture on day one so the budget goes to the writing. This guide covers what Starlight actually includes as of late 2026, where its limits are, how to structure docs once you have it, and the separate question the title promises: when documentation should live on its own site at all. Starlight’s facts below come from its official documentation, checked in November 2026.

The short version: use Starlight unless your docs are mostly generated API reference, your design cannot bend to a theme, or your product’s docs are really an interactive app. Those exceptions are covered below — everything else should start from Starlight.

What Starlight is, and what it includes

Starlight is a documentation theme and component set built on Astro by the Astro team, installed as an Astro integration (npx astro add starlight, or start from its template). Your pages are Markdown or MDX files in src/content/docs/, and Starlight wraps them in the complete docs reading experience:

That list is the argument: each item is a small project on its own, and Starlight is free and open source. Astro’s own documentation runs on it, which is also why its edge cases get found by someone other than you.

The honest limits, checked November 2026

Starlight is the right default, not a finished platform. Three limits belong in the decision:

It is still 0.x software. Starlight sits in the 0.42 line as of late 2026, and its own getting-started guide describes it as beta. Releases are frequent, and a minor version can require migration steps — the 0.41 release, for example, dropped the previous Astro major, and 0.42 requires a current Astro 7. Budget a small, regular upgrade habit rather than treating the docs site as set-and-forget. The configuration surface itself is stable and documented in the Starlight configuration reference; it is the upgrade cadence that asks for attention.

Search only exists after a build. The Pagefind index is generated during astro build, so search does nothing on the dev server. Writers checking search behaviour need a production build and preview — a small workflow surprise worth knowing before your team reports search as broken.

There is no built-in versioning. Starlight has no feature for serving v1 and v2 docs side by side with a version switcher. Teams that need it assemble it from folders and sidebar config, or run separate sites per version. The versioning section below covers why postponing that need is usually right anyway.

How far you can bend the design

A reasonable fear with any theme is outgrowing its look. Starlight’s customisation comes in layers, and most projects only need the first two:

The practical line: if your brand work is colours, type and a logo, Starlight bends easily. If your design requires a different page anatomy — no sidebar, a marketing-style hero on every page — you are no longer customising a docs theme, and the custom build in the next section is the honest route.

Starlight versus rolling your own docs

Choose Starlight when your docs are primarily prose with code samples, your team is small, and conventional navigation is a virtue. Readers arriving from other products’ docs will feel at home instantly, because the layout conventions — sidebar left, contents right, search on top — are the ones the industry settled on.

Choose a custom Astro build when the “docs” are really a hybrid: heavy interactive demos on most pages, an API reference generated from an OpenAPI specification as the main event rather than a section, or branding strict enough that you would spend longer fighting a theme than building fresh. That build-versus-theme judgement is the same one in choosing an Astro theme generally: start from the option that is 80% right, and verify the missing 20% is small.

Winner for most projects: Starlight. The custom build’s advantages only appear in cases Starlight was never aimed at.

A middle path exists and is underused: Starlight for the documentation section of a larger Astro site, with marketing pages built separately. Many product sites keep /docs/ on Starlight while the rest of the site uses a bespoke design, because the two audiences arrive with different intent and never compare the furniture.

Structuring docs people can navigate

Starlight gives you a sidebar; it does not give you an information architecture. The structure that works:

Write the sidebar order as the learning order. If a reader must already understand page nine to read page three, the order is wrong, not the reader.

File names deserve the same care, because in Starlight the file path is the URL: src/content/docs/guides/install.md answers at /guides/install/. Name files the way readers search — install, deploying-to-production, api-keys — and the URLs, the sidebar and the search results all inherit the clarity. A healthy small docs tree looks like this:

src/content/docs/
├── index.mdx            → the docs home page
├── start/
│   ├── install.md
│   ├── first-project.md
│   └── deploy.md
├── guides/
│   ├── authentication.md
│   └── webhooks.md
└── reference/
    ├── configuration.md
    └── cli.md

Three folders, three jobs: the path a beginner walks, the tasks a user returns for, and the facts a reader looks up. Most documentation problems are visible in this tree before a single page is written — a misc/ folder, forty files at the root, or guides and reference mixed together are all structure asking to be fixed first.

Search, versions, and the details that separate real docs

Search is non-negotiable beyond a handful of pages. Starlight’s built-in Pagefind covers it for static sites, and because it indexes the built HTML it works on a plain Cloudflare Pages deployment with no extra services. Test it with the queries readers actually type, including the synonym your product does not use — that test is in the checklist below because it fails more often than any other.

Versioning is the detail to postpone deliberately. Maintain one current docs set until you genuinely support two released versions at once, because half-maintained versioned docs are worse than none: readers land on the wrong version, follow instructions for software they do not have, and blame the product. When the day comes, the folder-per-version workaround or separate sites both work; neither needs deciding today.

Code samples must be runnable or clearly marked as fragments. A reader who copies your example and hits an error trusts nothing else on the page — and unlike a blog reader, a docs reader was mid-task and now has two problems.

Edit-this-page links quietly convert your best readers into contributors. A reader who spots a wrong flag at 11pm will fix it if the link is there, and file nothing if it is not.

When docs deserve their own site

The default is a section of the main site (/docs/), and it is right for most projects: one domain, one deploy, shared navigation, and the SEO weight of the docs accrues to the domain that sells the product. Give docs their own site — usually a subdomain such as docs.example.com — when one of these becomes true:

Notice what is not on the list: “the docs got big.” Size alone is a structure problem, solved by the sidebar and search you already have. A separate site is an operational decision, not a growth milestone — and splitting early costs you the shared domain authority and the reader’s single, predictable address.

The docs site starter checklist

How we researched this

Starlight’s feature list, limits and configuration options above are taken from its official documentation at starlight.astro.build, checked in November 2026 against the 0.42 release line. The structure and site-splitting advice is the guide’s own judgement, written for publishers rather than framework maintainers — it is not based on operating a Starlight site for this article, and the places where a claim is a recommendation rather than a documented fact are phrased as one.

FAQ

Is Starlight free? Yes — Starlight is open source and free to use, like Astro itself. Your costs are hosting (often a free static tier) and your writing time.

Can Starlight handle API reference documentation? It handles prose API guides well. For reference generated directly from an OpenAPI specification, people often pair Starlight pages with a dedicated API-reference tool or a custom section, rather than forcing one tool to do both jobs.

Does Starlight support multiple versions of my docs? Not as a built-in feature. The common approaches are a folder per version with sidebar config to match, or a separate site per version. Most projects are better served by one current docs set until two versions are genuinely supported at once.

Should my docs live in the same repository as my product? Keeping docs in the product repo makes it easier to update docs in the same change as the feature, which is the single best predictor of docs staying accurate. Starlight works fine as a section of a larger Astro site or as its own site fed by that repo.

How is a docs site different from a blog in Astro? Navigation and intent. Blogs are chronological and browsed; docs are hierarchical and searched. Technically both are content collections — the difference is structure, sidebar, and search, which is what Starlight adds.

What to do next

Scaffold Starlight, write only the getting-started path, and test it by following your own instructions on a clean machine or a fresh terminal. That single test finds more problems than any design review. If your product also needs a marketing site, the themes in the directory pair naturally with a Starlight docs section, and the broader case for Astro on content-led sites explains why the same stack serves both halves comfortably. Deployment specifics are in deploying Astro on Cloudflare Pages.

Category: Astro Themes & Starters · Tags: #astro #checklist #starters #tutorial

Next step: this article is part of Astro guides, which covers the full topic from first setup to advanced use.

Related guides