Sha256: 36f06c982a9986e933f7a667243beead9989a973aef6a99fa09b9e51e9f41e6b

Contents?: true

Size: 1.94 KB

Versions: 1

Compression:

Stored size: 1.94 KB

Contents

{% assign page-url = page.url | split: "/" %}
{% assign iterator = 2 %}
{% assign breadcrumb-path = "/" %}
<nav aria-label="breadcrumb" id="breadcrumb">
    {% if site.data.settings.breadcrumb.image %}
        {{site.data.settings.breadcrumb.image}}
    {% endif %}
    <div class="container">
        <h1>{{page.title}}</h1>
        <ol class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList">
            <li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"
            class="breadcrumb-item">
                <a itemprop="item" href="/">
                    <span itemprop="name">Home</span>
                    <meta itemprop="position" content="1" />
                </a>
            </li>
            {% for section in page-url %}
                {% if forloop.last == false %}
                        {% if section == "" or section == "index.html" %}
                            {% continue %}
                        {% capture breadcrumb-path %}{{breadcrumb-path}}{{section}}/{% endcapture%}
                            <li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
                                <a itemprop="item" href="{{breadcrumb-path}}">
                                    <span itemprop="name">{{section | truncate: 20 | capitalize }}</span>
                                </a>
                                <meta itemprop="position" content="{{iterator}}" />
                            </li>
                        {% endif %}
                {% else %}
                    <li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem" class="active">
                        <span itemprop="name">{{page.title}}</span>
                        <meta itemprop="position" content="{{iterator}}" />
                    </li>
                {% endif %}
                {% assign iterator = iterator | plus: 1 %}
            {% endfor %}
        </ol>
    </div>
</nav>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
jumbo-jekyll-theme-5.7.0 _includes/components/breadcrumb.html