Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
Astro documentation template for product docs, support centers, and internal knowledge bases with MDX, Pagefind search, and light/dark UI.
Compass is an Astro 7 documentation template for product docs, support centers, and internal knowledge bases, serving as a starting repository that you copy and customize rather than a prebuilt framework. It combines MDX content collections, category-driven navigation, Pagefind search, reusable MDX components, and a light/dark UI in one template without requiring a heavyweight documentation framework.
Compass is an open-source (MIT-licensed) documentation theme distributed as a GitHub repository template, meant to be cloned and rebranded with your own content, structure, and site metadata. It runs on Astro 7 with Tailwind CSS 4 and TypeScript, takes Markdown/MDX articles placed in src/content/docs as input, and outputs a static docs site with parent landing pages, nested sub-category pages, article routes, an RSS feed at /rss.xml, a sitemap, and a Pagefind search bundle. The template's main configuration lives in site.config.mjs, where you set the site URL, name, title, description, GitHub link, navigation CTA, and footer text before publishing.
src/content/docs with a slug-matched .mdx file, supporting extended frontmatter such as tags, status, author, editUrl, heroImage, hideFromSearch, redirectFrom, relatedLinks, and order.src/data/docs.ts power homepage cards, parent category organization, sidebar navigation, and nested route generation.npm run build, so testing the full search locally requires npm run preview rather than npm run dev.src/components/docs/mdx-components.ts and available automatically in article routes.status to draft or archived to exclude articles from generated routes, navigation, search, redirects, and RSS; use redirectFrom to generate redirect aliases for renamed docs; use hideFromSearch to keep pages out of the Pagefind index./rss.xml via @astrojs/rss and a sitemap via @astrojs/sitemap.astro:assets, and relative Markdown images are supported; public/ is reserved for files needing stable direct URLs like favicons and Open Graph images.@tailwindcss/typography, with previous/next article navigation within each docs section.site.config.mjs.draft, published, deprecated, and archived.editUrl, a public repository template, and versioned releases through GitHub Releases.site.config.mjs and src/data/docs.ts, then add MDX articles under src/content/docs.draft or archived to keep them out of the live site, or set redirectFrom to preserve URLs when moving content./rss.xml so readers can subscribe to recent documentation updates.Compass is used as a GitHub repository template. Open the repo, click "Use this template", create a new repository for your docs site, clone it locally, then run npm install and npm run dev to start editing at http://localhost:3000. Search is generated during npm run build, so use npm run preview to test the full search experience. Validate content and data with npm run check, and run npm run build to produce the static site, RSS feed, sitemap, and Pagefind bundle.
Yes. Compass is released under the MIT License and is designed to be used as a public GitHub repository template. There is no paid tier or license key mentioned.
Update site.config.mjs with your own siteUrl, name, title, description, githubUrl, navCtaLabel, navCtaHref, and footerText. The file contains placeholder URLs by default, and astro.config.mjs uses the value of siteUrl for the canonical site URL.
Run npm run build to generate the Pagefind search bundle, then run npm run preview. The dev server (npm run dev) does not include the generated search index.
Yes. Set hideFromSearch: true in an article's frontmatter to keep it out of the Pagefind index, or set status to draft or archived to exclude the page from routes, navigation, search, redirects, and RSS.
Parent pages use /:parent such as /getting-started, sub-category pages use /:parent/:category, and article pages use /:parent/:category/:slug. One-segment sub-category URLs are not generated by default.
