Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
Astro documentation starter with Markdown/MDX, i18n, Algolia search, sidebar nav, and dark mode.
Astro Docs Template is a documentation website starter kit built on the Astro framework that turns Markdown and MDX files into a responsive, multi-language docs site with sidebar navigation, Algolia-powered search, and dark mode.
Astro Docs Template is a GitHub template repository (advanced-astro/astro-docs-template) that scaffolds a documentation site with the Astro static site generator. It takes content authored as Markdown (.md) and MDX (.mdx) files placed under src/content/docs/[lang]/ and generates a production static site in ./dist/ when you run pnpm run build. It installs with the command pnpm create astro@latest -- --template advanced-astro/astro-docs-template and starts a local dev server at localhost:3000 via pnpm run dev. The project is maintained by the advanced-astro organization and ships with a default layout (src/layouts/MainLayout.astro) plus a src/config.ts file that centralizes site metadata, sidebar navigation, and language settings.
The template bundles a set of documentation-focused features that work out of the box.
SIDEBAR object in src/config.ts, organized into section headers and page links.src/config.ts and a search box appears in the header.src/content/docs/ plus a KNOWN_LANGUAGES map in src/config.ts enable a language switcher.Astro Docs Template fits anyone who needs a functional documentation site without building a frontend from scratch.
KNOWN_LANGUAGES in src/config.ts.The template supports several concrete documentation scenarios out of the box.
.md files in src/content/docs/en/ and running pnpm run build to generate the static site.KNOWN_LANGUAGES, and updating the sidebar config.dist/ folder to any static host.After scaffolding with create astro, you edit src/config.ts to set your project title, description, default language, sidebar entries, and Algolia DocSearch credentials. Content lives as Markdown or MDX files with frontmatter defining the layout and title/description for SEO. Run pnpm run dev to preview locally or pnpm run build to output a static site to dist/, then follow Astro's deployment guides to go live.
Yes. The template includes i18n support out of the box: create a new folder under src/content/docs/ for each language and add the language name to KNOWN_LANGUAGES in src/config.ts. The site header then shows a language switcher.
The template integrates Algolia DocSearch. If your project qualifies for DocSearch (free for open-source projects), put your API key and index name in src/config.ts and the search box automatically appears in the header. If you don't use DocSearch, you can remove the Algolia component by editing src/components/Header.astro.
Yes. The theme's colors are defined as CSS variables in src/styles/theme.scss. The default is a cool blue accent; change the --theme-accent variable to any color you want.
Run pnpm run build from the project root to generate a static site in ./dist/. You can preview the production build locally with pnpm run preview, and deploy the dist/ folder to any static host, such as Netlify or Vercel, using Astro's deployment guides.
