Navigation#
Inkstone builds sidebar navigation from the Markdown file tree.
Navigation uses:
- folder structure
README.mdandindex.mdconventions- frontmatter
title - frontmatter
order - first H1 fallback
- filename fallback
Page Titles#
Inkstone resolves titles in this order:
- frontmatter
title - first H1 heading
- filename converted to title case
---
title: Installation
order: 1
---
# Install Inkstone
The sidebar label is Installation.
Page Order#
order sorts pages inside their current navigation group:
---
title: Laravel Usage
order: 3
---
If two pages have the same order, Inkstone falls back to alphabetical sorting.
Group Order#
Use an index.md or README.md file inside the folder to control the group itself.
For example:
docs/
README.md
getting-started/
index.md
installation.md
standalone-usage.md
Set the root page first:
---
title: Introduction
order: 0
---
Then set the group order in docs/getting-started/index.md:
---
title: Getting Started
order: 1
---
This places Getting Started after Introduction.
Parent Groups#
Folder parents are labels, not links. When a group has an index.md document, Inkstone adds that page as the first Overview child.
Example output:
Introduction
Getting Started
Overview
Installation
Standalone Usage
This keeps parent labels stable while still exposing the folder index page.
URL Rules#
docs/README.md -> /
docs/getting-started.md -> /getting-started
docs/configuration/index.md -> /configuration
docs/configuration/github.md -> /configuration/github
When pretty URLs are enabled, these are written as index.html files in matching directories.
Collapsible Sections#
Sidebar parent sections can be collapsed. The initial state is configured with navigation.expanded:
'navigation' => [
'expanded' => [], // default: only the active section
],
| Value | Behavior |
|---|---|
true |
All sections start expanded |
false |
All sections start collapsed (active section still expands) |
[] |
Only the active section starts expanded |
['getting-started', 'features'] |
Only the listed slugs start expanded |
The active section always remains expanded regardless of configuration. Collapse state is persisted in the browser across page loads.