This is the source for docs.nhost.io, built with Astro and Starlight.
docs/
├── public/ # Static assets (favicons, etc.)
├── src/
│ ├── assets/ # Images and other assets
│ ├── components/ # Custom Astro components
│ ├── content/
│ │ └── docs/ # Documentation pages (.md/.mdx)
│ ├── plugins/ # Custom Starlight plugins
│ ├── schemas/ # OpenAPI schemas for API reference
│ └── styles/ # Custom CSS
├── astro.config.mjs # Astro/Starlight configuration
└── package.json
# Install dependencies
pnpm install
# Start dev server at localhost:4321
pnpm dev
# Build for production
pnpm build
# Preview production build
pnpm previewDocumentation pages live in src/content/docs/. Each .md or .mdx file becomes a page based on its path:
src/content/docs/products/auth.md→/products/auth/src/content/docs/getting-started/index.md→/getting-started/
Every page needs frontmatter at the top:
---
title: Page Title
description: A brief description for SEO and previews.
keywords: [keyword1, keyword2]
---The sidebar is configured in astro.config.mjs using starlightSidebarTopics. Add new pages to the appropriate section.
API documentation is auto-generated from OpenAPI schemas in src/schemas/. To update:
- Edit the relevant schema file (
auth.yamlorstorage.yaml) - The pages will regenerate on build