<ol itemscope itemtype=“schema.org/BreadcrumbList” class=“breadcrumb”>

<li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
    <a href="/" itemprop="item">
        <span itemprop="name">Home</span>
    </a>
    <meta itemprop="position" content="1" />
</li>
{% assign crumbs = page.url | split: '/' %}
{% assign crumbs_total = crumbs | size | minus: 1 %}
{% for crumb in crumbs offset: 1 %}
    {%- assign position =  forloop.index |plus: 1 -%}
    {% if forloop.index == crumbs_total %}
        <li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem" class="active">
            <a itemprop="item" href="{{ site.baseurl }}{{ page.url }}">
                <span itemprop="name">{{page.title}}</span>
            </a>
            <meta itemprop="position" content={{ position }} />
        </li>
    {% else %}
        {% assign crumb_limit = forloop.index | plus: 1 %}
        {% capture crumb_url %}{% for c in crumbs limit: crumb_limit %}{{ c | append: '/' }}{% endfor %}{% endcapture %}
        {% capture crumb_with_index %}{{ crumb_url | append: 'index.html' }}{% endcapture %}
        {% capture current_page %}{{ site.baseurl }}{{ page.url }}{% endcapture %}
        {% for p in site.pages %}
            {% if crumb_with_index != current_page and crumb_with_index == p.url %}
            <li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
                <a itemprop="item" href="{{ crumb_with_index }}">
                    <span itemprop="name">{{ crumb | replace:'-',' ' | capitalize}}</span>
                </a>
                <meta itemprop="position" content={{ position }} />
            </li>
            {% break %}
            {% endif %}
        {% endfor %}
    {% endif %}
{% endfor %}

</ol>