Crumbtrails

The crumbtrail pattern is very useful to orientate visitors when navigating deep folder hierarchies; you can see an example above ^^.

Project source code

The crumbtrail helper does the job of iterating the parent folders and the std::crumbtrail plugin provides a partial and stylesheet for rendering a crumbtrail nav menu.

To use the crumbtrail system first add a dependency on the std::crumbtrail plugin to your site.toml settings:

[dependencies."std::crumbtrail"]
version = "~1"
apply = { styles = [ "**" ] }

Then call the partial supplied by the plugin wherever you want to render a crumbtrail:

{{> crumbtrail}}

The plugin styles are small so you may prefer to copy them into your stylesheet. If you do copy the styles to your project change the dependency so you that the plugin styles are not applied; it should look like this:

[dependencies."std::crumbtrail"]
version = "~1"