Writing and structure

Docs, folders, sub-docs, URLs and redirects, frontmatter, the editor, the live preview, saving, and zip import and export.

Your site is a tree of docs. You write and organize them in the workspace: the explorer on the left, the editor in the middle, and a live preview on the right that renders your doc exactly as it will publish.

The explorer

The explorer shows your docs and folders in the same order your published sidebar uses, with the same labels.

  • New doc, new folder, new sub-doc. Use the buttons at the top, the right-click menu on any row, or Alt+N. A doc can own child docs: drop a doc onto another doc (or choose New sub-doc) and it becomes one sidebar entry that expands.
  • Reorder. Drag a row above or below another, or press Alt+Up and Alt+Down. Alt+Shift+Up and Alt+Shift+Down move a doc out of or into a folder.
  • Rename (F2) changes the title or folder label only. Your URLs stay stable.
  • Change URL or Move to changes where a doc lives. The old address keeps working: a redirect is created for you automatically, including for everything inside a moved folder.
  • Delete asks for confirmation and tells you how many docs are inside a folder. The toast that follows has an Undo button.
  • Mark draft keeps a doc out of the published site while you work on it. Drafts show a dot in the explorer and render in your preview, but visitors never see them.

The editor

  • Tabs. Open several docs at once. A dot marks unsaved changes.
  • Properties. Title, URL slug, description and the draft switch sit above the body, so you never edit raw frontmatter. The Advanced disclosure holds the sidebar label, hide title, and the AI version of the page.
  • MDX editor. Syntax highlighting for Markdown and components. Type / at the start of a line to insert a component, or use the Insert button in the toolbar. Inside a component tag, completion suggests props and their values. Problems are underlined as you type: an unknown component, a missing closing tag, or a Prime component on a free site.
  • Shortcuts. Cmd/Ctrl+S saves now, Cmd/Ctrl+P opens any doc by name, Cmd/Ctrl+Shift+P opens the command palette (new doc, publish, settings, insert a component, export).

Saving

Your work saves itself about a second after you stop typing, and the status bar tells you where things stand. Two guards protect a live site: a brand-new doc on a published site starts as a draft, and if your doc currently has an MDX error, autosave waits until you fix it (Cmd/Ctrl+S saves anyway). If the same doc was changed somewhere else, for example by an AI assistant using your key, you get a banner with Keep mine and Use theirs instead of a silent overwrite. Unsaved text is also kept in your browser, so a closed tab offers to restore it.

The preview

The preview renders what you are typing, not the last saved version, inside your real site chrome: sidebar, navbar, footer, theme. It updates within a moment of each pause and keeps your scroll position. If a component is malformed, the preview shows the error and the editor marks the line. Clicking a link in the preview opens that doc in the editor. Use the toggle in the preview header to check the mobile layout, and the open button to see the page in a full tab.

Docs, pages, and URLs

A doc is served at /docs/<folder>/<name>. Folders become sidebar categories; a folder URL opens its first doc. A standalone page lives outside the sidebar and is served at /<name>, which suits a landing or legal page. Your home page is edited from the pinned Home page entry at the top of the explorer.

Frontmatter

The properties form covers the common fields, and they are stored as frontmatter if you prefer to think of it that way:

title: Installing the CLI
description: One-line summary used in search and the page index.
sidebar_label: Install
sidebar_position: 2
hide_title: false
draft: false

Markdown or MDX

New docs are MDX, which is Markdown plus the component kit. Plain Markdown docs you imported keep working; the Advanced disclosure offers to convert one when you want components in it. Raw HTML, scripts, and imports are not allowed; only the documented components render.

Import and export

Already have Markdown? Choose Import a zip when creating a site, or from the top-bar menu later, with .md and .mdx files in the familiar docs/ plus category-metadata layout that many doc tools use. Redirects import too. Export your whole site as a zip at any time from Settings, so your content is always yours.