Sidebar Configuration
CrychicDoc builds its sidebar from Markdown files and directory-level frontmatter. When you add a section, reorder pages, or change expansion behavior, the relevant edits usually belong in the page itself or the matching sidebarIndex.md.
Generation Rules
CrychicDoc's sidebar is generated automatically from Markdown files and directory metadata. In most cases, the only things you need to maintain are page titles, ordering, directory-level metadata, and a few fields that control how the current tree expands.
Common Fields
To effectively manage the sidebar, you need to understand the following key frontmatter fields.
| Field | Type | Description |
|---|---|---|
root | boolean | Mark a directory's sidebarIndex.md as a new root node in the sidebar. |
title | string | Required. Title displayed in the sidebar. |
priority | number | Required. Sort weight, smaller numbers appear first. |
maxDepth | number | Controls how deep the current directory view expands downward. |
hidden | boolean | If true, this page or directory will not appear in the sidebar. |
externalLinks | object[] | Add links to external websites in root nodes. |
useChildrenCollapsed | object | Controls only how child directory items appear in the current generated tree, without rewriting child frontmatter. |
New Documentation Areas
Other Common Cases
Adding External Links
Add externalLinks in the frontmatter of the root directory AwesomeMod/sidebarIndex.md.
---
root: true
title: "AwesomeMod Guide"
# ... other configurations ...
externalLinks:
- text: "Official Wiki"
link: "https://awesomemod.com/wiki"
priority: -999 # Use negative numbers to make links appear first
- text: "GitHub Repository"
link: "https://github.com/user/awesomemod"
priority: -1000
---Using useChildrenCollapsed for Current-Tree Folding
If your real goal is just to decide how child directory items appear in the current sidebar tree, use useChildrenCollapsed.
The useChildrenCollapsed Field
| Field path | Type | Default behavior | Effect |
|---|---|---|---|
useChildrenCollapsed | object | omitted means "keep each child item's own collapsed value" | Current-tree child folding rule. |
useChildrenCollapsed.mode | "children" | "self" | "collapsed" | "open" | children | Keep each child as-is, follow the current directory, force collapsed, or force open. |
useChildrenCollapsed.depth | number | 1 | Affects how many descendant levels inherit the rule. |
This only affects how directory items appear in the current generated sidebar tree:
- it does not rewrite a child directory's own
collapsed; - it does not rewrite a child directory's own
maxDepth; - it does not rewrite child document frontmatter;
- it does not take over traversal ownership.
Minimal example:
---
root: true
title: "Modpack"
useChildrenCollapsed:
mode: collapsed
depth: 1
---This keeps the authoring model simple: direct child directory items in this tree start collapsed.
If you want descendants to follow the current directory's own collapsed value:
---
root: true
collapsed: true
useChildrenCollapsed:
mode: self
depth: 2
---That makes children and grandchildren in the current tree follow the current directory state.
Directory Landing File Rules
When a directory needs a clickable landing page, the system looks for these files in order:
index.mdCatalogue.mdREADME.md
Directory-level metadata usually belongs in sidebarIndex.md.
This keeps first-party sections free to use Catalogue.md, while mirrored third-party docs can rely on their existing README.md instead of carrying an extra Catalogue.md.