1
0
mirror of https://github.com/privacyguides/privacyguides.org.git synced 2025-09-14 22:18:46 +00:00

Add breadcrumb metadata (#2072)

This commit is contained in:
2023-03-05 13:37:36 -06:00
parent 35c95c029c
commit f3f092d1a3
2 changed files with 53 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
{% macro render(nav_item, ref = nav_item) %}
{% if nav_item.children %}
{% set first = nav_item.children | first %}
{% if first.children %}
{{ render(first, ref) }}
{% else %}
<a href="{{ first.canonical_url | url }}" class="md-path__link" property="item" typeof="WebPage">
<span class="md-ellipsis" property="name">
{{ ref.title }}
</span>
</a>
{% endif %}
{% else %}
<a href="{{ nav_item.canonical_url | url }}" class="md-path__link" property="item" typeof="WebPage">
<span class="md-ellipsis" property="name">
{{ ref.title }}
</span>
</a>
{% endif %}
{% endmacro %}