Home

MkDocs plugin that allows you to display the page tree. Like sitemap.xml, but for humans.

Notes

  • Only the first occurrence of the marker {{ pagetree }} on a page is replaced.
  • The plugin or marker can be used on several pages.
  • 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.
  • 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

Pagetree demo

Code

# docs_dir/file.md

{{ pagetree }}

Rendered