Make breadcrumbs nicer looking

This commit is contained in:
2019-12-01 14:33:22 -06:00
parent 685d1077e2
commit 4db30271ee
4 changed files with 6 additions and 2 deletions

View File

@ -8,7 +8,8 @@
{% if forloop.last %}
<li class="breadcrumb-item active" aria-current="page" itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
<link href="{% assign crumb_limit = forloop.index | plus: 1 %}{% for crumb in crumbs limit: crumb_limit %}{{ crumb | append: '/' | replace:'without-plugin/','without-plugins/' }}{% endfor %}" itemprop="item" />
<span itemprop="name">{{ crumb | replace:'-',' ' | remove:'.html' | capitalize }}</span>
<span itemprop="name">{% if page.breadcrumb %}{{ page.breadcrumb }}{% else %}{% assign words = crumb | replace:'-',' ' | remove:'.html' | split: ' ' %}{% capture titlecase %}{% for word in words %}{{ word | capitalize }} {% endfor %}{% endcapture %}{{ titlecase }}{% endif %}
</span>
<meta itemprop="position" content="{{ forloop.index }}" />
</li>
{% else %}