A page is a .md or .mdx file under src/content/docs/. Its path on disk is its URL and its place in the sidebar — there is no separate routing or navigation config.
File to URL
| File | URL |
|---|---|
src/content/docs/guides/install.mdx |
/guides/install/ |
src/content/docs/guides/styling.mdx |
/guides/styling/ |
src/content/docs/guides/index.mdx |
/guides/ |
The URLs end in a slash with Astro’s default trailingSlash and build.format; see Links and trailing slashes. Slugs are lowercased and folder index files collapse to the directory URL. A directory’s index.mdx becomes the landing page for that section.
- src/content/docs/
- introduction.mdx
- guides/
- index.mdx
- styling.mdx
Custom Astro routes
Files you add under src/pages/ use Astro’s native routing and rendering semantics. In a server-output project, a page or endpoint renders on request by default; set Astro’s prerender export when you want to make the choice explicit:
---
export const prerender = false;
---
<h1>Service status</h1>export const prerender = false;
export function GET() {
return new Response("pong");
}Use export const prerender = true to emit a custom route as static output during the build. No Nimbus route registration or allowlist is required.
This boundary is not limited to prerender. Dynamic segments, endpoint methods, redirects and responses, and other native Astro route behavior remain controlled by the route itself. Nimbus only intervenes when a route claims the exact pattern of a configured canonical content route, package-injected infrastructure, an active feature, or a published content entry.
Nimbus’s rendering configuration controls the routes it manages: each collection’s catch-all route, and the scaffolded llms.txt and Markdown routes that call a Nimbus factory. Those files are yours to edit, but rendering decides how they render; nimbus-docs check --fix keeps them in step. Other files under src/pages/, such as Open Graph images and robots.txt, use Astro’s native rendering behavior like any other route.
Page modes
Every page renders inside DocsLayout by default — sidebar, table of contents, breadcrumbs, prev/next. Opt a page out of all chrome with mode:
---
title: Welcome
mode: custom
---mode: custom is for landing pages and bespoke layouts. Per-column toggles (sidebar: false, tableOfContents: false) turn off individual pieces without going fully custom — see Layouts.
Drafts
draft: true keeps a page out of production builds and the llms.txt indexes, while still rendering under astro dev (treated as noindex). Use it for work in progress.
---
title: Experimental feature
draft: true
---Collections
src/content/docs/ is the primary collection, served at the site root. To add another, such as a blog, see Collections. For route and URL helpers, see Package API.