Project structure
ReferenceConfig, content, components and styles each have one home.
astro.config.ts Starlight, sitemap, CSP and the sidebar built from docs.config.tsfunctions/api/feedback.ts "Was this helpful?" endpoint (Pages Function, Resend)public/ _headers, _redirects, favicon, fontsscripts/ validate-docs.mjs, validate-secrets.cjssrc/ config/ site.config.ts name, url, description docs.config.ts tabs, groups, links, UI strings i18n.config.ts locales csp.config.ts Content-Security-Policy sources content/docs/docs/ articles, one folder per group components/docs/ Starlight overrides (Header, Sidebar, PageTitle, Footer, ...) lib/docs.ts helpers used by the components pages/docs/index.astro the docs home (card grid) styles/starlight.css look: fonts, accent, type scale, layout test/ Playwright specs (layout, axe, CSP, search)Rules of thumb
Section titled “Rules of thumb”- Structure and wording come from
docs.config.ts, never from the components. - Every group folder needs an
index.mdxand every article needsintroandtype;pnpm validate:docsenforces both. - Colors and fonts are CSS variables in
starlight.css; do not hardcode them in components.
Was this helpful?