From 88c2832807c8d4a1ed97f74d2342e2563f598d8d Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Wed, 12 Jan 2022 07:21:58 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=86=95Breadcrumbs=20for=20Collections?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _config.yml | 3 +++ _includes/breadcrumbs.liquid | 12 +++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/_config.yml b/_config.yml index 3c08547..dad9452 100644 --- a/_config.yml +++ b/_config.yml @@ -116,6 +116,9 @@ xaymar: enabled: true length: 100 links: + collection: + permalink: '/:coll' + slugify: 'default' category: permalink: '/category/:cat' slugify: 'default' diff --git a/_includes/breadcrumbs.liquid b/_includes/breadcrumbs.liquid index b4f8aa8..45a1d40 100644 --- a/_includes/breadcrumbs.liquid +++ b/_includes/breadcrumbs.liquid @@ -6,6 +6,16 @@ {% if include.permalink != "/" and include.permalink != "/index.html" %} » + {% if page.collection %} + {% assign entry=page.collection %} + {% assign collection=entry | slugify: site.xaymar.links.collection.slugify %} + + + {{ entry }} + + + » + {% endif %} {% assign cnt=page.categories | size %} {% if cnt > 0 %} {% for entry in page.categories %} @@ -15,8 +25,8 @@ {{ entry }} + » {% endfor %} - » {% endif %}