Skip to main content

Golem Documentation

Michael Bernstein

Hierarchical Navigation & Auto-Discovery

Golem features an intelligent navigation discovery engine that builds sidebar navigation trees directly from your filesystem hierarchy.

Section & Document Ordering with :nav_order:

When auto-discovering navigation trees, Golem uses document metadata to establish reading hierarchy:

content/getting-started.adoc
ASCIIDOC
= Getting Started
:nav_order: 10
:idprefix:
:idseparator: -

Sorting Precedence

  1. Explicit :nav_order: weight: Documents and directory sections with lower numeric values appear first (e.g. 10 before 20).
  2. Directory Section Weights: For a directory (e.g., user-guide/), Golem reads :nav_order: from its index.adoc (or readme.adoc) entry point to determine where the section appears relative to sibling sections.
  3. Unordered Fallback: Items without :nav_order: default to a weight of 999 and are sorted alphabetically by filename.

Explicit Navigation Overrides

If you prefer to define navigation order manually, specify nav in [navigation]:

golem.toml
TOML
[navigation]
nav = [
    "index.adoc",
    "guides/first-steps.adoc",
    "guides/advanced.adoc",
]
nav_order

A page-header attribute (:nav_order: N) that sets the integer sort key controlling where a page appears in the navigation tree. Lower values sort first.

partial

An AsciiDoc source file whose name begins with an underscore (e.g. _shared.adoc). Partials are excluded from standalone compilation and intended for use with include:: directives only.

page-role

A page-header attribute (:page-role: <role>) that signals a page's special purpose to Golem plugins. Currently recognized roles: index (site-wide term index) and glossary (aggregated glossary).