From f26598e560378f1d3d80068943b9b63f6052ad2d Mon Sep 17 00:00:00 2001 From: Daniel Wagner-Hall Date: Tue, 17 Mar 2026 15:55:47 +0000 Subject: [PATCH] Skip empty links in breadcrumbs If a `_index.md` file has `build.render = "never"` set, it ends up as an ancestor but without a link. This means we render a link with the title of the page, but with a blank link, which makes a link to the current page. This is never useful. e.g. on https://piscine.codeyourfuture.io/sprints/1/day-plan/ there's a "Piscine" link that has an empty `href` (so points at the current page) which shouldn't be there. This is because `org-cyf-piscine/content/sprints/_index.md` sets `build.render = "never"` because it's a single-module course, so the extra level of nesting isn't so useful. --- .../layouts/partials/breadcrumbs.html | 50 ++++++++++--------- 1 file changed, 27 insertions(+), 23 deletions(-) diff --git a/common-theme/layouts/partials/breadcrumbs.html b/common-theme/layouts/partials/breadcrumbs.html index 447b39df0..073237e43 100644 --- a/common-theme/layouts/partials/breadcrumbs.html +++ b/common-theme/layouts/partials/breadcrumbs.html @@ -1,30 +1,34 @@ {{ with .Parent }}