Add a page

Drop in a markdown file and link it from the sidebar.


1. Create the file

Pick a slug, mirror it as a folder path under your project's docs root:

site/
  how-to/
    my-new-topic.md

In multi-project mode, "the docs root" is the project's folder, not the site's root.

2. Add frontmatter

---
title: My new topic
description: One-line summary shown in meta tags.
---

Body content here.

Edit the relevant sharpdocs.json and add the slug under a group:

{
  "label": "How to…",
  "items": [
    { "label": "My new topic", "slug": "how-to/my-new-topic" }
  ]
}

In multi-project mode, edit the project's sharpdocs.json, not the root one.

4. Restart the host

SharpDocs scans at startup and caches for the process lifetime. Any change to markdown or sharpdocs.json needs a restart.

Gotchas

  • Slugs are case-insensitive in the lookup, but keep filenames consistent — they appear in URLs.
  • index.md at a folder root collapses its slug. how-to/index.md is addressable as /how-to, not /how-to/index.
  • Missing slugs throw. A sidebar entry with no matching file fails the project. In single-project mode this is fatal; in multi-project mode the offending project is degraded and the rest of the site boots.