You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tac.apache.org by gm...@apache.org on 2023/03/26 12:56:49 UTC

[tac-website] branch main updated: Fix breadcrumbs

This is an automated email from the ASF dual-hosted git repository.

gmcdonald pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tac-website.git


The following commit(s) were added to refs/heads/main by this push:
     new af1adc0  Fix breadcrumbs
     new f046337  Merge pull request #7 from sebbASF/breadcrumbfix
af1adc0 is described below

commit af1adc0414f79c899879059e1c4e016dfe018be1
Author: Sebb <se...@apache.org>
AuthorDate: Sun Mar 26 13:52:28 2023 +0100

    Fix breadcrumbs
    
    Must remove .html before adding initial capitals
    (Not sure why this worked previously)
---
 layouts/partials/breadcrumbs.html | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/layouts/partials/breadcrumbs.html b/layouts/partials/breadcrumbs.html
index 5b0b306..ef82a5b 100644
--- a/layouts/partials/breadcrumbs.html
+++ b/layouts/partials/breadcrumbs.html
@@ -1,12 +1,12 @@
 {{ $url := replace .Permalink ( printf "%s" .Site.BaseURL) "" }}
-{{ $.Scratch.Add "path" "/" }}
+{{ $.Scratch.Set "path" "/" }}
 <nav aria-label="breadcrumb">
   <ol class="breadcrumb">
     <li class="breadcrumb-item"><a href="/">Home</a></li>
-    {{ range $index, $element := split $url "/" }}
+    {{ range $element := split $url "/" }}
         {{ $.Scratch.Add "path" $element }}
         {{ if ne $element "" }}
-            <li class="breadcrumb-item"><a href='{{ $.Scratch.Get "path" }}'>{{ replace (humanize .) ".html" "" }}</a></li>
+            <li class="breadcrumb-item"><a href='{{ $.Scratch.Get "path" }}'>{{ replace . ".html" "" | humanize }}</a></li>
             {{ $.Scratch.Add "path" "/" }}
         {{ end }}
     {{ end }}


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@tac.apache.org
For additional commands, e-mail: commits-help@tac.apache.org