<div class="alert alert-light m-0 mb-2 p-2" role="alert">
    <nav aria-label="breadcrumb">
    <ol class="breadcrumb m-0">
        <li class="breadcrumb-item"><a href="{{ site.url }}">Inicio</a></li>

        {% if post.post_type == 'page' %}
        {# Si tiene padres, recorrerlos #}
        {% set ancestors = post.ancestors %}
        {% for ancestor in ancestors|reverse %}
            <li class="breadcrumb-item">
            <a href="{{ ancestor.link }}">{{ ancestor.title }}</a>
            </li>
        {% endfor %}
        <li class="breadcrumb-item active" aria-current="page">{{ post.title }}</li>

        {% elseif post.post_type == 'post' %}
        <li class="breadcrumb-item"><a href="{{ site.url }}/blog">Blog</a></li>
        <li class="breadcrumb-item active" aria-current="page">{{ post.title }}</li>

        {% elseif post.post_type != 'page' %}
        <li class="breadcrumb-item"><a href="{{ post.type_archive_link }}">{{ post.post_type_label }}</a></li>
        <li class="breadcrumb-item active" aria-current="page">{{ post.title }}</li>
        {% endif %}
    </ol>
    </nav>
</div>
