From 4cc3fb26ce5380007061914da522f8cb7d46675f Mon Sep 17 00:00:00 2001 From: David Segonds Date: Fri, 6 Jan 2023 09:11:50 +0100 Subject: [PATCH] Modify breadcrumbs logic First part of the breadcrumbs generation algorithm is to remove the base URL from the parent's permalink URL. In the existing code, this is achieve by replacing all instances of base URL in the parent's permalink URL by an empty string. This algorithm fails to produces breadcrumbs in the instance where the base URL is "/" for example. I believe this is erroneous as only the first instance of the base URLi, starting at the beginning of the parent's permalink URL should be replaced by an empty string. This is the reason I replaced the call to "replace" by a call to "replaceRE". --- layouts/partials/breadcrumbs.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/partials/breadcrumbs.html b/layouts/partials/breadcrumbs.html index 7e8257b7..23934aa8 100644 --- a/layouts/partials/breadcrumbs.html +++ b/layouts/partials/breadcrumbs.html @@ -1,6 +1,6 @@ {{- if (.Param "ShowBreadCrumbs") -}}