forked from python-namibia/python-namibia.github.io-2016
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbreadcrumb
More file actions
17 lines (16 loc) · 699 Bytes
/
Copy pathbreadcrumb
File metadata and controls
17 lines (16 loc) · 699 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
{% comment %}
*
* http://stackoverflow.com/questions/9612235/what-are-some-good-ways-to-implement-breadcrumbs-on-a-jekyll-site
*
{% endcomment %}
<nav class="breadcrumbs" role="menubar" aria-label="breadcrumbs">
<a href="{{ site.url }}">{{ site.data.language.breadcrumb_start }}</a>
{% assign crumbs = page.url | split: '/' %}
{% for crumb in crumbs offset: 1 %}
{% if forloop.last %}
<a class="current">{{ page.title }}</a>
{% else %}
<a href="{{ site.url }}{% assign crumb_limit = forloop.index | plus: 1 %}{% for crumb in crumbs limit: crumb_limit %}{{ crumb | append: '/' }}{% endfor %}">{{ crumb | replace:'-',' ' }}</a>
{% endif %}
{% endfor %}
</nav>