Navigation
The navigation of the documentation is generated automatically from the folders structure of pages/docs/: there is nothing to configure.
Sidebar
The sidebar is built from nested sections: each sub-folder containing an index.md file becomes a collapsible group, at any depth.
pages/docs/
├─ index.md → /docs/
├─ 1-getting-started.md
└─ guides/
├─ index.md → group "Guides"
├─ 1-notes.md
└─ advanced/
├─ index.md → group "Advanced", inside "Guides"
└─ 1-customization.md
The index.md file of a group defines its title, its description and its position, and its content is displayed on the group page, followed by the list of its pages:
---
title: Guides
description: Tutorials and instructions.
weight: 20
---
Guides are a set of tutorials to help you understand how to use Statidocs.
Ordering
Pages and groups are sorted by weight (ascending):
- for a page, use a number prefix in its file name (e.g.
1-getting-started.md) or theweightfront matter variable; - for a group, use the
weightfront matter variable in itsindex.mdfile.
Collapsed groups
Groups are open by default. To collapse a group, set collapsed: true in the front matter of its index.md file:
---
title: Advanced
collapsed: true
---
To collapse all groups, use the sidebar.collapsed option in the configuration:
sidebar:
collapsed: true
Breadcrumb and previous/next links
Each documentation page displays a breadcrumb (based on its ancestors) and links to the previous and next pages, following the order of the sidebar, through nested groups.
Table of contents
The “On this page” table of contents is generated from the headings (##, ###) of the page, and highlights the current section while scrolling.
Header and footer menus
The main menu is displayed in the header (and in the sidebar on mobile), and the optional footer menu in the footer:
menus:
main:
- id: docs
name: Documentation
url: /docs/
weight: 10
footer:
- id: cecil
name: Cecil
url: https://cecil.app
A page can also be added to a menu from its front matter:
---
title: About
menu:
main:
weight: 999
---