nav: make breadcrumb separator configurable #529

This commit is contained in:
Sören Weber 2023-05-18 16:20:27 +02:00
parent c3a67fad85
commit 5936477bbd
No known key found for this signature in database
GPG key ID: BEC6D55545451B6D
4 changed files with 10 additions and 1 deletions

View file

@ -199,6 +199,7 @@ disableHugoGeneratorInject = true
disableInlineCopyToClipBoard = true
disableNextPrev = false
disableLandingPageButton = true
breadcrumbSeparator = ">"
titleSeparator = "::"
themeVariant = [ "auto", "relearn-bright", "relearn-light", "relearn-dark", "learn", "neon", "blue", "green", "red" ]
themeVariantAuto = [ "relearn-light", "relearn-dark" ]

View file

@ -75,6 +75,8 @@ Note that some of these parameters are explained in details in other sections of
ordersectionsby = "weight"
# Change default color scheme with a variant one. Eg. can be "auto", "red", "blue", "green" or an array like [ "blue", "green" ].
themeVariant = "auto"
# Change the breadcrumb separator. Default to ">".
breadcrumbSeparator = "|"
# Change the title separator. Default to "::".
titleSeparator = "-"
# If set to true, the menu in the sidebar will be displayed in a collapsible tree view. Although the functionality works with old browsers (IE11), the display of the expander icons is limited to modern browsers

View file

@ -18,6 +18,12 @@ This document shows you what's new in the latest release. For a detailed list of
---
## 5.14.0 (2023-05-18)
- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} The new parameter `breadcrumbSeparator` is now available in your `config.toml` to change the - well - separator of the breadcrumb items. An appropriate default is in place if you do not configure anything.
---
## 5.13.0 (2023-05-17)
- {{% badge style="note" title=" " %}}Change{{% /badge %}} The `swagger` shortcode was deprecated in favor for the [`openapi` shortcode]({{% relref "shortcodes/openapi" %}}). You don't need to change anything yet as the old name will be used as a fallback. It is planned to remove the `swagger` shortcode in the next major release.

View file

@ -184,7 +184,7 @@
{{- if not $title }}
{{- $title = $to.Site.Title }}
{{- end }}
<li itemscope itemtype="https://schema.org/ListItem" itemprop="itemListElement">{{ if $remaining }}<a itemprop="item" href="{{ partial "relLangPrettyUglyURL.hugo" (dict "to" $to) }}">{{end}}<span itemprop="name">{{ $title }}</span>{{ if $remaining }}</a>{{ end }}<meta itemprop="position" content="{{ $depth }}">{{ if $remaining }} > {{ end }}</li>
<li itemscope itemtype="https://schema.org/ListItem" itemprop="itemListElement">{{ if $remaining }}<a itemprop="item" href="{{ partial "relLangPrettyUglyURL.hugo" (dict "to" $to) }}">{{end}}<span itemprop="name">{{ $title }}</span>{{ if $remaining }}</a>{{ end }}<meta itemprop="position" content="{{ $depth }}">{{ if $remaining }} {{ default ">" .Site.Params.breadcrumbSeparator }} {{ end }}</li>
{{- end }}
{{- end }}
{{- end }}