Writing and structure
Pages, folders, paths, frontmatter, the editor and live preview, and zip import and export.
Writing and structure
Your site is a tree of Markdown pages. You write and organize them in the Content tab, with a file tree on the left, a Markdown editor in the middle, and a live preview on the right that renders your page exactly as it will publish.
The editor
- File tree. Folders and pages, like a code editor. Create a page, create a folder, rename, move, and delete straight from the tree. You never type a raw path; a page's path follows its place in the tree, so moving a page moves its URL.
- Markdown editor. Write the page body in Markdown. Each page is either
mdormdx, switchable per page (see Components). Use the Insert menu above the editor to drop a ready-to-edit snippet for any component straight at your cursor. - Live preview. Updates as you type, with every component rendered, so what you see is what publishes.
Pages and paths
A documentation page lives at a path like docs/<folder>/<name> and is served at
/docs/<folder>/<name>. The first segment is always docs, and folders become
sidebar categories.
A standalone page lives at pages/<name> and is served at /<name>. Use it
for a page that should not appear in the doc sidebar, like a landing or marketing
page.
Frontmatter
Every page can begin with frontmatter that controls how it appears:
title: Installing the CLI
description: One-line summary used in search and the page index.
sidebar_label: Install
sidebar_position: 2Available fields: title, description, sidebar_label, sidebar_position
(a number, lower sorts higher), hide_title (hide the auto H1), and draft.
Folders and categories
Folders in the tree become categories in the sidebar. Set a category's label,
its order, and whether it starts collapsed in the Navigation tab. A
page's order inside its category comes from its sidebar_position.
Drafts
Set draft: true (or use the draft toggle) to keep a page out of the published
site while you work on it. It still appears in your editor and preview.
Markdown or MDX
Choose md for plain CommonMark plus GitHub-flavored Markdown, or mdx
to use the component kit. Raw HTML, scripts, and imports are not allowed; only
the documented components render.
Import and export
Already have Markdown? Use Import a zip of .md and .mdx files in the
familiar docs/ plus category-metadata layout that many doc tools use. You can
export your whole site as a zip at any time, so your content is always yours
and always portable.