The SidebarPlugin generates the necessary page metadata needed for the vertical navigation shown on some Mosaic pages.
The output from the plugin is added to a sidebarData metadata property of the page.
The rootDirGlob is used to determine the "root" directories of the sidebar. So for example:
*/*/*- generate sidebar data for the pages that are 3 directories deep in the filesystem hierarchy*/!(product-a)/*- same as above but ignore the product-a directoryproducts/product-b- generate a sidebar just for product-b in the products directory
To rearrange pages in the sidebar or to apply a different label to a page you can configure the sidebar using page frontmatter.
This plugin runs with a priority of 3.
| Property | Description |
|---|---|
| filename | filename of the sidebar json, linked to each related page via ref |
| rootDirGlob | Glob pattern for matching directories which should be the root of the sidebar |
Add the following to the plugins collection: