No commit activity in last 3 years
No release in over 3 years
There's a lot of open issues
Breadcrumbs helper for Middleman
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
~> 1.5.0
>= 2.10.5
>= 0

Runtime

>= 4.0.0
 Project Readme

middleman-breadcrumbs

Breadcrumbs helper for Middleman

Installation

Install the gem as usual: put gem 'middleman-breadcrumbs' in Gemfile, then run bundle install.

Put activate :breadcrumbs in config.rb (not in the configure :build block).

Configuration

This gem has two configuration options, which are set in the usual way for Middleman extensions.

:separator
String that separates the breadcrumb levels. Default is  > .
:wrapper
Tag name (as a symbol) in which to wrap each breadcrumb level. Default is nil, which means no wrapping.

For example, if you wanted to wrap the breadcrumb levels in <li> elements and separate them with bullets, you would put the following in config.rb:

activate :breadcrumbs, separator: ' • ', wrapper: :li

Usage

In your view files, just call breadcrumbs(current_page) to display breadcrumbs. By default, this will use the separator and wrapper defined in the config.rb file.

If you want to override the separator or wrapper defined in the config.rb file, pass the appropriate options to the breadcrumbs method:

<%= breadcrumbs(current_page, separator: ' ||| ', wrapper: :div) %>