Documents and Hierarchy
updated
This document is a child of How Meldoc Works. You can see the nesting in the sidebar — it appears indented under its parent.
How nesting works
There are two ways to nest documents:
- In the web editor — drag a document onto another in the sidebar, and it becomes a child.
- In
.meldoc.mdfiles — add aparentAliasfield to the frontmatter pointing to the parent’s alias.
For example, this document’s frontmatter looks like:
---
alias: demo-documents-hierarchy
title: Documents and Hierarchy
parentAlias: demo-how-meldoc-works
order: 0
---
The order field controls the position among siblings. Lower numbers come first.
Depth limit
Meldoc supports up to 3 levels of nesting. This keeps your documentation scannable and easy to navigate. For an example of the deepest level, see Mermaid Diagrams — it’s a grandchild document (level 3).
Try it yourself
- Look at the sidebar — notice how this document is nested under its parent
- Try dragging a document to reorder it in the sidebar
- Create a new document and nest it under this one