23 lines
930 B
HTML
23 lines
930 B
HTML
{% assign categories = include.path | split:"/" %}
|
|
{% assign filename_without_extension = categories | last | split:"." | first %}
|
|
{% if categories contains "_posts" or filename_without_extension == "index" %}
|
|
{% comment %} posts are like /docs/python/_posts/2016-06-06-foobar.md {% endcomment %}
|
|
{% comment %} OR pages are index.* i.e.: like /docs/python/index.md or index.html {% endcomment %}
|
|
{% assign categories = categories | pop %}
|
|
{% endif %}
|
|
|
|
{% assign route="" %}
|
|
|
|
<div class="container wrap breadcrumbs">
|
|
<a href="{{ '/' | absolute_url }}">Home</a>
|
|
{% for category in categories %}
|
|
<span class="prompt margin-left-10 margin-right-10">></span>
|
|
{% assign route = route | append: '/' | append: category %}
|
|
{% if forloop.last %}
|
|
{% if include.title %}{{include.title}}{% else %}{{ category }}{% endif %}
|
|
{% else %}
|
|
<a href="{{ route | absolute_url }}">{{ category }}</a>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</div>
|