correct breadcrumbs urls

This commit is contained in:
Ivan Blinkov 2020-05-09 00:10:06 +03:00 committed by GitHub
parent e90f3033cf
commit 9c736a4573
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,11 +4,11 @@
<div class="row"> <div class="row">
<nav class="col text-muted" aria-label="breadcrumb"> <nav class="col text-muted" aria-label="breadcrumb">
<ol class="breadcrumb bg-transparent p-0"> <ol class="breadcrumb bg-transparent p-0">
{% set ancestor = namespace(level=page.ancestors|length) %}
{% for parent in page.ancestors|reverse %} {% for parent in page.ancestors|reverse %}
<li class="breadcrumb-item"> <li class="breadcrumb-item">
<a href="{{ page.abs_url }}" class="text-reset"> <a href="{{ '../' * ancestor.level }}" class="text-reset">{{ parent.title }}</a>
{{ parent.title }} {% set ancestor.level = ancestor.level - 1 %}
</a>
</li> </li>
{% endfor %} {% endfor %}
</ol> </ol>