Skip to content

Static Docs Pages

A static docs page is a standalone MDX file placed directly inside src/content/docs/. It becomes a page in your documentation site — with the Starlight layout, sidebar, and navigation — but is not part of any folder group.

Common uses:

  • Welcome page
  • Landing page for a section
  • Single-topic page (FAQ, Changelog, Roadmap)
  • Thank-you pages

Every file you drop into src/content/docs/ becomes a route.

FileURL
src/content/docs/welcome.mdx/welcome/
src/content/docs/changelog.mdx/changelog/
src/content/docs/faq.mdx/faq/

src/content/docs/
├── index.mdx
├── welcome.mdx ← static docs page
├── changelog.mdx ← static docs page
├── getstart/ ← folder group
├── cms/ ← folder group
└── ...

Files at the root of docs/ become top-level URLs. Files inside subfolders become nested URLs.


For these standalone pages, use the .mdx extension, not .md.

Why? MDX supports:

  • JSX components
  • Imports
  • Astro expressions like {frontmatter.title}
  • Dynamic content

Plain .md files work too, but MDX is the recommended format for docs pages because it lets you import widgets, cards, and interactive elements.


Every static docs page has two parts:

  1. Frontmatter (between --- markers)
  2. Body (Markdown + optional MDX)
---
title: Tester
description: Get Astro Docus premium template for only $29. Starlight Astro JS documentation template with blog, landing, pricing. JSON driven, MDX ready, SEO optimized. Buy now on Gumroad.
template: splash
tableOfContents: false
prev: false
next: false
---
Bro

This renders at /welcome/.


Frontmatter controls how the page behaves inside Starlight. Each field affects the layout or navigation.

FieldPurpose
titlePage title — shown in sidebar, browser tab, and page header
descriptionMeta description for SEO and social previews
templateLayout variant — doc (default) or splash
tableOfContentsShow/hide the right-side TOC
prevShow/hide the “Previous page” link at the bottom
nextShow/hide the “Next page” link at the bottom
ValueResult
docStandard documentation layout with sidebar (default)
splashWide, centered layout — great for welcome pages

Use splash when you want the page to feel like a landing page rather than a doc.

ValueResult
true (default)Show the right-side heading navigation
falseHide it

Set to false when the page has no headings, or when you want a cleaner layout.

ValueResult
true (default)Show the previous/next navigation links
falseHide them

Set both to false for pages that are standalone — like a welcome page or a thank-you page.


  1. In VS Code, right-click src/content/docs/.
  2. Click New File.
  3. Name it with .mdx: welcome.mdx, changelog.mdx, etc.

Copy this template and adjust:

---
title: Welcome
description: A short description of what this page is about.
template: splash
tableOfContents: false
prev: false
next: false
---
Your content goes here.

Below the frontmatter, write standard Markdown:

---
title: Welcome
description: Welcome to Astro Docus.
template: splash
tableOfContents: false
prev: false
next: false
---
## Welcome to Astro Docus
This is a documentation and blog template built with **Astro** and **Starlight**.
### What's inside
- Documentation system with MDX
- Blog with tags and categories
- Landing page and pricing pages
- JSON-driven content
Ready to get started? Visit the [Get Started](/getstart/) section.
  1. Run npm run dev if it’s not already running.
  2. Open http://localhost:4321/welcome/.
  3. The page renders inside the Starlight layout.

By default, new pages in src/content/docs/ do not appear in the sidebar. You must add them manually.

Open astro.config.mjs and find the sidebar array. Add an entry:

{
label: 'Welcome',
link: '/welcome/',
},

Or nest it inside an existing group:

{
label: 'Get Started',
items: [
{ label: 'Welcome', link: '/welcome/' },
{ label: 'Installation', link: '/getstart/installation/' },
],
},

Save the file. The dev server reloads and the sidebar updates.

Reminder: Starlight does not auto-add root-level pages to the sidebar. Only autogenerate directories do that.


If you want a page to live inside a URL prefix without creating a full folder group, use a subfolder:

src/content/docs/legal/terms.mdx → /legal/terms/
src/content/docs/legal/privacy.mdx → /legal/privacy/

The folder acts as a URL segment. You can add it to the sidebar as an autogenerated group:

{
label: 'Legal',
autogenerate: { directory: 'legal' },
},

Because it’s MDX, you can import and use Astro components:

---
title: Welcome
description: Welcome to Astro Docus.
template: splash
tableOfContents: false
prev: false
next: false
---
import Start from '../../widget/index_page/getstart.astro';
import '../../styles/index_page.css';
## Get Started
<Start />

This lets you embed card grids, widgets, or any other component into a docs page.


There are two types of “static” pages in Astro Docus. They are easy to confuse.

FeatureDocs pageStatic page
Locationsrc/content/docs/src/pages/
Extension.mdx (recommended).md or .astro
LayoutStarlight (automatic)Custom (page.astro, contact.astro, etc.)
SidebarYes (if added)No
URLBased on folder structureBased on filename
Use forDocumentationAbout, Terms, Contact

Docs pages get the Starlight chrome (sidebar, search, theme toggle) automatically. Static pages in src/pages/ do not — they use whatever layout you specify.


  1. Open the .mdx file.
  2. Change frontmatter or body.
  3. Save.
  1. Right-click the .mdx file.
  2. Delete.
  3. Remove the sidebar entry from astro.config.mjs.

  1. Use .mdx, not .md for standalone docs pages.
  2. Always include title and description in frontmatter.
  3. Use template: splash for welcome or landing pages.
  4. Set prev: false and next: false for standalone pages.
  5. Add to sidebar manually in astro.config.mjs — otherwise it’s invisible.
  6. Respect the folder structure — subfolders create nested URLs.

---
title: Welcome
description: Welcome to our documentation.
template: splash
tableOfContents: false
prev: false
next: false
---
## Welcome
Start with the [Get Started](/getstart/) guide.
---
title: Changelog
description: All updates to this project.
tableOfContents: false
---
## v1.0.0 — Initial Release
- Documentation system
- Blog with tags
- Landing page
---
title: FAQ
description: Frequently asked questions.
tableOfContents: true
---
## How do I install?
Run `npm install` then `npm run dev`.
## How do I deploy?
See the [Hosting section](/deploy-hosting/).
---
title: Thank You
description: Your purchase is confirmed.
template: splash
tableOfContents: false
prev: false
next: false
---
## Thank you for your purchase!
Your download link has been sent to your email.

src/content/docs/welcome.mdx → /welcome/
src/content/docs/changelog.mdx → /changelog/
src/content/docs/faq.mdx → /faq/

Frontmatter minimum:

---
title: Page Title
description: Page description
---

For standalone pages, add:

template: splash
tableOfContents: false
prev: false
next: false

Then:

  1. Create the .mdx file.
  2. Write frontmatter.
  3. Write body.
  4. Add to sidebar in astro.config.mjs.
  5. Save and preview.
  • MDX only — not .md — for docs pages.
  • Automatic layout — Starlight provides the chrome.
  • Manual sidebar — you must add it yourself.
  • Splash template — for welcome and landing-style pages.