Skip to content

Sidebar Configuration Practical Guide

This guide will walk you through how to configure and manage CrychicDoc's sidebar through a series of common tasks.

Core Concept: Frontmatter-Driven Configuration

CrychicDoc's sidebar system automatically generates configuration by reading the frontmatter you set in Markdown files. You only need to declare metadata (like title, priority) in documents, then run a script, and the sidebar will automatically update.

Core Configuration Fields

To effectively manage the sidebar, you need to understand the following key frontmatter fields.

Field Type Description
root boolean Mark a directory's index.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.
hidden boolean If true, this page or directory will not appear in the sidebar.
externalLinks object[] Add links to external websites in root nodes.

Practical Tutorial: Configuring a New Documentation Area

Advanced Tips

Add externalLinks in the frontmatter of the root directory AwesomeMod/index.md.

yaml
---
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 itemOrder to Implicitly Set Priority