taxonomy: add configurable breadcrumbs to term page #705

This commit is contained in:
Sören Weber 2023-10-29 23:49:10 +01:00
parent 2846b735c7
commit 1eb3bf3159
No known key found for this signature in database
GPG key ID: BEC6D55545451B6D
4 changed files with 17 additions and 1 deletions

View file

@ -53,6 +53,8 @@ Note that some of these parameters are explained in details in other sections of
disableLanguageSwitchingButton = false
# Hide breadcrumbs in the header and only show the current page title
disableBreadcrumb = true
# Hide breadcrumbs in the term pages and only show the current page title
disableTermBreadcrumbs = true
# Hide the root (first) breadcrumb in the header
disableRootBreadcrumb = true
# If set to true, hide table of contents menu in the header of all pages

View file

@ -18,6 +18,12 @@ This document shows you what's new in the latest release and flags it with one o
---
## 5.24.0-beta {#5240}
- {{% badge style="note" title=" " %}}Change{{% /badge %}} The term page of a taxonomy now adds the breadcrumb for each listed page. If this gets too crowded for you, you can turn the breadcrumbs off in your `config.toml` by adding `disableTermBreadcrumbs=true`.
---
## 5.23.0 (2023-10-29) {#5230}
- {{% badge style="note" title=" " %}}Change{{% /badge %}} With {{% badge color="fuchsia" icon="fab fa-hackerrank" title=" " %}}0.120.0{{% /badge %}} the author settings move into the `[params]` array in your `config.toml`. Because this collides with the previous way, the theme expected author information, it now adheres to Hugo standards and prints out a warning during built if something is wrong.

View file

@ -29,7 +29,11 @@
<ul class="columnize">
{{- end }}
{{- $c:=""}}{{/* display pages of a term */}}
<li><a href="{{ partial "relLangPrettyUglyURL.hugo" (dict "to" .Page) }}">{{ .Title }}</a></li>
{{- $breadcrumb := "" }}
{{- if (ne .Page.Site.Params.disableTermBreadcrumbs true) }}
{{- $breadcrumb = (trim ((partial "breadcrumbs.html" (dict "page" .Page "dirOnly" true)) | plainify | htmlUnescape) "\n\r\t ") }}
{{- end }}
<li><a href="{{ partial "relLangPrettyUglyURL.hugo" (dict "to" .Page) }}">{{ .Title }}</a>{{ with $breadcrumb }}<br><div class="breadcrumbs highlightable">{{ . }}</div>{{ end }}</li>
{{- $lastCapital = $capital }}
{{- end }}
{{- if ne $lastCapital "" }}

View file

@ -2071,6 +2071,10 @@ html[dir="rtl"] #R-sidebar ul.collapsible-menu > li > label > i.fa-chevron-right
}
}
.columnize .breadcrumbs{
font-size: .859625rem;
}
#R-body .tab-panel{
margin-bottom: 1.5rem;
margin-top: 1.5rem;