You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

26 lines
1.2 KiB

{% assign crumbs = page.url | split:'/' %}
{% assign crumbs_length = crumbs | size %}
{% if crumbs_length == 0 %}
{% assign_page crumb_page = '/index.html' %}
<span itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
<a itemprop="item" itemtype="https://schema.org/Thing" href="{{ site.baseurl }}{{ crumb_page.url }}">
<div class="link-gelato" style="display: inline;" itemprop="name">{{ crumb_page.title }}</div>
<meta itemprop="position" content="1" />
</a>
</span>
{% else %}
{% for crumb in crumbs %}
{% capture last_crumb %}{{last_crumb}}/{{crumb}}{% endcapture %}
{% capture path %}{{last_crumb}}/index.html{% endcapture %}
{% assign_page crumb_page = path | replace:'//','/' %}
{% if crumb_page %}
<span itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
<a itemprop="item" itemtype="https://schema.org/Thing" href="{{ site.baseurl }}{{ crumb_page.url }}">
<div class="link-gelato" style="display: inline;" itemprop="name">{{ crumb_page.title }}</div>
<meta itemprop="position" content="{{ forloop.index }}" />
</a>
</span>
{% endif %}
{% endfor %}
{% endif %}