BreadcrumbsPlugin

The BreadcrumbsPlugin is responsible for generating the data needed to show breadcrumbs navigation on pages. It then appends this data to a breadcrumbs property in the page metadata.

Should a page already have a breadcrumbs property in it's metadata then it is respected and not overwritten.

If a page has a sidebar.groupLabel property in it's metadata then this is used as the label for the breadcrumb, otherwise the page title is used.

When the BreadcrumbsPlugin is traversing up directories, it needs to know what page in the directory represents the breadcrumb for that directory. It is recommended to use the index page for this but the page to use is a configurable option of the breadcrumbs plugin.

Priority

This plugin runs with no special priority.

Options

PropertyDescription
indexPageNameThe page name to use for "directory" breadcrumbs

Adding to Mosaic

Add the following to the plugins collection:

plugins: [
  {
    modulePath: '@jpmorganchase/mosaic-plugins/BreadcrumbsPlugin',
    options: {
      indexPageName: 'index.mdx'
    }
  }
  // other plugins
];
Mosaic BETA

Coming soon