MkDocs Pagetree Plugin
MkDocs plugin that allows you to display the page tree. Like sitemap.xml
, but for humans.
Options
The following tree options for the pagetree marker exists:
-
{{ pagetree(all) }}
Render the whole pagetree. This is the default tree option, the
(all)
parameter can also be omitted. -
{{ pagetree(children) }}
Render only direct children of the current page
-
{{ pagetree(siblings) }}
Render only direct siblings of the current page, excluding the current page
-
{{ pagetree(subtree) }}
Render the subtree which contains the current page
Notes
- The plugin or marker can be used on several pages.
- Only the first occurrence of the marker
{{ pagetree }}
on a page is replaced. - If any page
status
is used (Ref), allow filtering the pagetree for these statuses. - If no page with the
status
attribute exists, the filter will not be rendered.
Demo
Code
# docs_dir/file.md
{{ pagetree }}
Rendered
- MkDocs Pagetree Plugin
- Deprecated page deprecated
-
Section 1
-
Section 2
-
Section 3
- Pagetree with subtree new
-
Subsection 1
- Subsection 1 Index Page
-
Subsubsection 1
-
Subsection 2