🆕Breadcrumbs for Collections

This commit is contained in:
Michael Fabian 'Xaymar' Dirks
2022-01-12 07:21:58 +01:00
parent ab6ff79a49
commit 88c2832807
2 changed files with 14 additions and 1 deletions
+3
View File
@@ -116,6 +116,9 @@ xaymar:
enabled: true
length: 100
links:
collection:
permalink: '/:coll'
slugify: 'default'
category:
permalink: '/category/:cat'
slugify: 'default'
+11 -1
View File
@@ -6,6 +6,16 @@
</span>
{% if include.permalink != "/" and include.permalink != "/index.html" %}
&raquo;
{% if page.collection %}
{% assign entry=page.collection %}
{% assign collection=entry | slugify: site.xaymar.links.collection.slugify %}
<span class="crumb">
<a href="{{ site.xaymar.links.collection.permalink | replace: ":coll", entry | absolute_url }}">
{{ entry }}
</a>
</span>
&raquo;
{% endif %}
{% assign cnt=page.categories | size %}
{% if cnt > 0 %}
{% for entry in page.categories %}
@@ -15,8 +25,8 @@
{{ entry }}
</a>
</span>
&raquo;
{% endfor %}
&raquo;
{% endif %}
<span class="crumb">
<a href="{{ include.permalink | absolute_url }}">