Skip to content

Instantly share code, notes, and snippets.

@antlis
Last active July 11, 2019 05:37
Show Gist options
  • Save antlis/871952be1e3fa98530a54855f48f0528 to your computer and use it in GitHub Desktop.
Save antlis/871952be1e3fa98530a54855f48f0528 to your computer and use it in GitHub Desktop.
mixin breadcrumb(pages)
nav.breadcrumb
ol.breadcrumb__list(itemscope itemtype='http://schema.org/BreadcrumbList')
each item, index in pages
li.breadcrumb__list-item(itemprop='itemListElement' itemscope itemtype='http://schema.org/ListItem')
if index != pages.length - 1
a.breadcrumb__item(href="#0")
span(itemprop="name")= item
span.breadcrumb__separator /
meta(itemprop='position' content=(index + 1))
else
span.breadcrumb__item.breadcrumb__item--current(aria-current='location')
span(itemprop="name")= item
link(itemprop="item" href="#0")
meta(itemprop='position' content=(index + 1))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment