Pages
Create pages with MDX files and frontmatter, and place them in your navigation.
Every page in a Velu site is an .mdx file with a block of YAML frontmatter at
the top. The frontmatter sets the page's title and metadata; the Markdown and
components below it are the page body.
Anatomy of a page
A page starts with frontmatter fenced by ---, followed by content.
---title: "Authentication"description: "Sign requests with an API key."---Every request to the Acme API needs an API key. This page shows how to createone and send it.## Create a key...
title is required. description is recommended: it's used as the page's meta
description, its social card summary, and the subtitle under the page heading.
The page hero
You don't write an H1 yourself on standard pages. Velu renders the page hero
automatically from the frontmatter: the title becomes the top-level heading and
the description renders as the subtitle beneath it. Start your content with
## headings. Custom and frame modes skip the automatic hero so the MDX can
own the layout.
Supported frontmatter
These are the frontmatter fields Velu reads:
| Field | Type | Purpose |
|---|---|---|
title | string (required) | Page heading and sidebar label. |
description | string | Subtitle, meta description, and social summary. |
mode | string | Page layout. One of default, wide, custom, frame, center, assistant. |
hidden | boolean | Build the page but keep it out of the sidebar. |
noindex | boolean | Ask crawlers not to index the page. |
hidePagination | boolean | Hide previous/next links at the bottom of the page. |
keywords | string or array | SEO keyword terms. |
canonical | string | Canonical URL for the page. |
robots | string | Raw robots directive. |
og:* / twitter:* | string | Open Graph and Twitter card overrides. |
See SEO & metadata for how the SEO fields behave.
sidebarTitle, tag, and icon are not supported as page
frontmatter. The sidebar label always comes from title. If you need a
shorter label in the sidebar, shorten the title.
Page mode
mode controls which chrome surrounds the page. If you omit it, Velu uses the
standard layout: sidebar, table of contents, and footer.
---title: "Release notes"description: "What shipped this month."mode: "center"---
See Page modes for the chrome table and when to use each layout. Custom and frame hide the automatic page hero so you can build the layout in MDX. Assistant replaces the page body with a full-screen chat.
Show a page in the navigation
Writing a file doesn't put it in the sidebar. Add the page's path (relative to the project root, without the .mdx extension) to a group's pages array in
velu.json.
{"group": "Get started","pages": ["index", "guides/authentication"]}
The sidebar label is the page's title, and pages appear in the order you list
them. See Navigation for products, tabs, groups,
and anchors.
Hidden pages
A page with hidden: true still builds and is reachable by its URL, but it
doesn't appear in the sidebar and you don't need to list it in pages. Use it
for pages you link to directly: a beta feature, a landing page, or a page
referenced only from another page.
---title: "Early access"hidden: true---
Hidden pages are left out of search indexing unless you set seo.indexing to
all.
