Path Navigation

Mr.Hope ... 2021-2-27 Layout
  • Breadcrumb
  • Layout
Less than 1 minute

The theme adds a new Breadcrumb support, you can config it using breadcrumb in Frontmatter and themeConfig Support page config [1], the default value is true.

Without any config, a Breadcrumb that matches the theme color is displayed at the top of the page content to help the reader understand the document structure.

You can also control the icon display of the path navigation using breadcrumbIcon field Support page config, the default value is true.

Notice

To ensure Breadcrumb working well, the readme.md file should be included in each folder.

Otherwise, the path navigation will automatically ignore that level because the component can not generate titles and links from the corresponding level folder.


  1. Page config support

    Support local configurationSupport page config means that the theme allows the configuration of the page to override the global configuration.

    Example

    Take path navigation as an example:

    This feature is enabled globally by default, that is, themeConfig.breadcrumb is true by default, and you can set breadcrumb: false in the Front Matter of a specific page to disable it locally.

    Of course, you can also set the themeConfig.breadcrumb option to false to disable it globally, and set breadcrumb: true in the Front Matter of a specific page to enable it locally.

    ↩︎
Last update: January 21, 2022 16:43
Contributors: Mr.Hope