{% capture url %}{{ page.url | remove: "/" | remove: page.language }}{% endcapture %}
{% if url.size > 0 %}
  <nav class="breadcrumbs hidden-sm-down">

    {% include icon.html class="breadcrumb-item" %}

    <ol class="breadcrumb list-unstyled" vocab="http://schema.org/" typeof="BreadcrumbList">
    {% assign position = 0 %}
    {% for crumb in breadcrumbs %}

      <!-- Skip for root -->
      {% if crumb.url == "/" %}
        {% continue %}
      {% endif %}

      <!-- Skip for language directory -->
      {% if page.language %}
        {% assign langpath = crumb.url | remove: "/" %}
        {% if langpath == page.language %}
          {% continue %}
        {% endif %}
      {% endif %}

      {% assign position = position  | plus: 1 %}
      {% assign subset = crumb.subset %}{% if subset %}{% capture caption %}{% tif subset %}{% endcapture %}{% else %}{% assign caption = crumb.title %}{% endif %}
      <li class="breadcrumb-item{% if crumb.url == page.url %} active{% endif %}" property="itemListElement" typeof="ListItem">
        {% if crumb.url != page.url %}<a property="item" typeof="WebPage" href="{{ crumb.url | prepend:site.baseurl }}">{% endif %}
        <span property="name">{{ caption }}</span>
        {% if crumb.url != page.url %}</a>{% endif %}
        <meta property="position" content="{{ position }}" />
      </li>
    {% endfor %}
    </ol>

  </nav>
{% endif %}

{% capture url %}{{ page.url | remove: "/" | remove: page.language }}{% endcapture %}
{% if url.size > 0 %}
  <nav class="breadcrumbs hidden-sm-down">

    {% include icon.html class="breadcrumb-item" %}

    <ol class="breadcrumb list-unstyled" vocab="http://schema.org/" typeof="BreadcrumbList">

    <!-- Iteration breadcrumb item -->
    {% assign position = 0 %}
    {% for crumb in breadcrumbs %}

      <!-- Skip if root -->
      {% if crumb.url == "/" %}
        {% continue %}
      {% endif %}

      <!-- Skip if language directory -->
      {% if page.language %}
        {% assign langpath = crumb.url | remove: "/" %}
        {% if langpath == page.language %}
          {% continue %}
        {% endif %}
      {% endif %}

      <!-- Get breadcrumb title, translates breadcrumb if YAML subset is set -->
      {% assign subset = crumb.subset %}
      {% if subset %}
        {% capture caption %}{% tif subset %}{% endcapture %}
      {% else %}
        {% assign caption = crumb.title %}
      {% endif %}

      <!-- SEO data -->
      {% assign position = position  | plus: 1 %}

      <li class="breadcrumb-item{% if crumb.url == page.url %} active{% endif %}" property="itemListElement" typeof="ListItem">
        {% if crumb.url != page.url %}<a property="item" typeof="WebPage" href="{{ crumb.url | prepend:site.baseurl }}">{% endif %}
        <span property="name">{{ caption }}</span>
        {% if crumb.url != page.url %}</a>{% endif %}
        <meta property="position" content="{{ position }}" />
      </li>

    {% endfor %}
    
    </ol>

  </nav>
{% endif %}

Enhance readability of source code
Enhance readability of source code
