summaryrefslogtreecommitdiffstats
path: root/themes/danix-xyz-hacker/layouts/partials/breadcrumb.html
diff options
context:
space:
mode:
Diffstat (limited to 'themes/danix-xyz-hacker/layouts/partials/breadcrumb.html')
-rw-r--r--themes/danix-xyz-hacker/layouts/partials/breadcrumb.html10
1 files changed, 6 insertions, 4 deletions
diff --git a/themes/danix-xyz-hacker/layouts/partials/breadcrumb.html b/themes/danix-xyz-hacker/layouts/partials/breadcrumb.html
index aa7c1e8..c15dfeb 100644
--- a/themes/danix-xyz-hacker/layouts/partials/breadcrumb.html
+++ b/themes/danix-xyz-hacker/layouts/partials/breadcrumb.html
@@ -1,14 +1,16 @@
{{ $homeLink := "/" }}
-{{ $articlesLink := "/articles/" }}
{{ if eq .Lang "it" }}
{{ $homeLink = "/it/" }}
- {{ $articlesLink = "/it/articles/" }}
{{ end }}
<nav class="breadcrumb mb-6" aria-label="Breadcrumb">
<a href="{{ $homeLink }}">{{ i18n "home" }}</a>
- <span class="breadcrumb-separator">/</span>
- <a href="{{ $articlesLink }}">{{ i18n "articles" }}</a>
+ {{ range .Ancestors.Reverse }}
+ {{ if ne .Kind "home" }}
+ <span class="breadcrumb-separator">/</span>
+ <a href="{{ .RelPermalink }}">{{ .Title }}</a>
+ {{ end }}
+ {{ end }}
<span class="breadcrumb-separator">/</span>
<span>{{ .Title }}</span>
</nav>