Pages and folders · amsham docs
amsham docs

Pages and folders

Frontmatter, meta.json, ordering, separators and sections.

A page

---
title: Pasta
description: Optional one-line summary, shown under the title and in search.
---

Write Markdown here.

.md and .mdx both work. A folder’s index.md is the page you get at the folder’s own URL.

A folder’s meta.json

Optional. Without it, the sidebar shows the folder name and sorts pages alphabetically.

{
  "title": "Cooking",
  "description": "Recipes and techniques",
  "root": true,
  "defaultOpen": true,
  "pages": ["index", "---Mains---", "pasta", "curry", "---Rest---", "..."]
}
KeyWhat it does
titleName in the sidebar
roottrue on a top-level folder makes it a section with its own sidebar
defaultOpenFolder starts expanded
pagesOrder. File and folder names without extensions
privatetrue hides the folder and everything in it from the public site. See Private sections

Inside pages:

  • "---Mains---" is a separator with a label.
  • "..." is every item not listed yet, alphabetically.
  • "!draft" hides draft from the sidebar (the page still builds).
  • "[GitHub](https://github.com)" is an external link.

Anything you leave out of pages drops out of the sidebar, so add "..." at the end if in doubt.

A new section

  1. Create content/docs/<name>/index.md.
  2. Add content/docs/<name>/meta.json with "root": true.
  3. Add "<name>" to the pages list in content/docs/meta.json, and a card on the home page if you like.