Mordoc Docs

Side Navigation

Configure the sidebar links that help readers move through your documentation.

2 MIN READ

The side navigation is the list of links shown beside normal documentation pages.

You already used it in Navigation Basics. This page goes one step deeper and shows how to organize the sidebar as your documentation grows.

Open the side navigation file

The side navigation lives here:

Text
config/navigation/sidenav.yaml

The starter project uses a small example:

Yaml
- label: The Ring
  expanded: true
  children:
    - label: Lore of the Ring
      path: /lore
    - label: Wielding the Ring
      path: /wielding-the-ring
    - label: Safeguards
      path: /safeguards

This file is written in YAML. Spaces matter, so keep the indentation lined up.

A sidebar link needs a label and a path:

Yaml
- label: Installation
  path: /installation

The label is what readers see.

The path is the route the link opens. Use the browser route, not the .md file path.

Most documentation sites use groups:

Yaml
- label: Getting Started
  children:
    - label: Installation
      path: /getting-started/installation
    - label: First Project
      path: /getting-started/first-project

The group label helps readers understand what the links have in common.

Use groups when you have several pages that belong together.

A group can also link to a page.

This is useful when the group has an overview page and several detail pages:

Yaml
- label: Getting Started
  path: /getting-started
  children:
    - label: Installation
      path: /getting-started/installation
    - label: First Project
      path: /getting-started/first-project

In this example, clicking Getting Started opens /getting-started.

The child links still appear under the group.

Open a group by default

Add expanded: true when you want a group to start open:

Yaml
- label: Getting Started
  expanded: true
  children:
    - label: Installation
      path: /getting-started/installation
    - label: First Project
      path: /getting-started/first-project

This is helpful for the first section readers are likely to use or you do not have many pages and you want all the groups to be expanded by default.

Keep labels short

Use labels that are clear at a glance:

Yaml
- label: Site Configuration
  path: /configuration/site-configuration

Avoid labels that try to explain the whole page:

Yaml
- label: How to Configure the Main Site Settings
  path: /configuration/site-configuration

The page title can be longer. The sidebar label should stay easy to scan.

If you create this file:

Text
content/en/configuration/site-configuration.md

Use this route in navigation:

Yaml
- label: Site Configuration
  path: /configuration/site-configuration

Do not link to the Markdown file:

Yaml
- label: Site Configuration
  path: /configuration/site-configuration.md

Readers use routes, so navigation should use routes too.

Save and check the sidebar

Save config/navigation/sidenav.yaml.

If your local server is running, the sidebar should update automatically. Click each new link once to make sure it opens the page you expected.

Next step

Configure top navigation.

© 2026 Mordoc DocsBuilt with Mordoc