Nieuw: versie 0.0.99 is beschikbaar. Lees de release notes.

Op deze pagina
This is an older version of the docs. View the latest
Deze pagina is nog niet vertaald. Je leest de originele versie. Bekijk originele pagina

Sidebar

Sidebar sources, in priority order:

  1. sidebar in config.json, matched by path prefix. Highest priority.
  2. nav in config.json, one flat tree shared by every page. Used only when no sidebar prefix matches.
  3. Folder structure, auto-generated. Used when neither sidebar nor nav is set.

Option 1 suits sites with several sections, for example a guide and a reference.

Multi-sidebar config ​

json
{
  "sidebar": {
    "/guide/": [
      {
        "title": "Introduction",
        "collapsed": false,
        "items": [
          { "title": "Getting Started", "path": "guide/getting-started" },
          { "title": "Configuration", "path": "guide/configuration" }
        ]
      }
    ],
    "/reference/": [
      {
        "title": "Reference",
        "items": [
          { "title": "Site Config", "path": "reference/site-config" }
        ]
      }
    ]
  }
}

Each key is a path prefix; the longest matching key applies. /guide/ and /guide/advanced/ can coexist, with the more specific key winning. An empty key ("" or /) is the catch-all.

Entries ​

Each entry is a link or a group. Groups nest to any depth:

Field Type Description
title string Link text or group heading.
path string Leaf link target: a docs page path, or a full http:///https:// URL. Omit it to make this entry a group.
items array Child entries. Set this (and omit path) to make this entry a group.
collapsed bool Groups only. See Collapse behavior.

A group without title renders as a heading-less cluster. See Grouping links without a heading.

A path starting with http:// or https:// is an external link:

json
{
  "sidebar": {
    "": [
      {
        "title": "Resources",
        "items": [
          { "title": "Getting Started", "path": "guide/getting-started" },
          { "title": "Source on GitHub", "path": "https://github.com/hawkinslabdev/bark" }
        ]
      }
    ]
  }
}

External entries render with an outbound arrow and open in a new tab (target="_blank", rel="noopener noreferrer"), like external top-nav items. They are never marked active, never auto-expand their group, and are excluded from prev/next pagination.

Only http and https are recognized; other values are treated as page paths.

Collapse behavior ​

collapsed sets whether a group is collapsible and its initial state:

Value Behavior
omitted Not collapsible. Always expanded
false Collapsible, starts expanded.
true Collapsible, starts collapsed.

A group containing the current page always renders expanded. Collapsing uses native <details>/<summary> and works without JavaScript.

Note

Static groups (no collapsed) suit reference material read top to bottom, such as this site's /reference/ sidebar. Collapsible groups suit long guides.

A group without title renders its links as one cluster without a heading. Top-level links would otherwise each be separated by a divider.

json
{
  "sidebar": {
    "": [
      {
        "items": [
          { "title": "Config & API Reference", "path": "reference/site-config" },
          { "title": "Changelog", "path": "more/changelog" }
        ]
      }
    ]
  }
}

The cluster is separated from the previous section by a divider. Heading-less groups are always expanded and not collapsible.

Laatst bijgewerkt: 2026-10-08