mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-23 07:47:54 +00:00
tags: translate breadcrumb and title for taxonomy #532
This commit is contained in:
parent
446482a381
commit
25cef423b7
2 changed files with 14 additions and 4 deletions
|
@ -9,7 +9,7 @@
|
|||
{{- if not $title }}
|
||||
{{- $title = .Data.Singular | humanize }}
|
||||
{{- end }}
|
||||
{{- $title = printf "%s %s %s" $title (default "::" .Site.Params.titleSeparator) (.Title | humanize) }}
|
||||
{{- $title = printf "%s %s %s" $title (default "::" .Site.Params.titleSeparator) .Title }}
|
||||
<h1 id="{{ $title | anchorize }}">{{ $title }}</h1>
|
||||
<ul class="columnize">
|
||||
{{- range sort .Pages "Title" }}
|
||||
|
|
|
@ -13,6 +13,11 @@
|
|||
{{- $title := .Title }}
|
||||
{{- if eq $outputFormat "searchpage" }}
|
||||
{{- $title = T "Search" }}
|
||||
{{- else if eq .Kind "taxonomy" }}
|
||||
{{- $title = i18n .Data.Plural }}
|
||||
{{- if not $title }}
|
||||
{{- $title = .Data.Plural | humanize }}
|
||||
{{- end }}
|
||||
{{- else if eq .Kind "term" }}
|
||||
{{- $title = i18n .Data.Singular }}
|
||||
{{- if not $title }}
|
||||
|
@ -179,10 +184,15 @@
|
|||
{{- if $ispublished }}
|
||||
{{- $depth = add $depth 1 }}
|
||||
{{- $title := $to.Title }}
|
||||
{{- if eq .Kind "term" }}
|
||||
{{- $title = i18n .Data.Singular }}
|
||||
{{- if eq .Kind "taxonomy" }}
|
||||
{{- $title = i18n $to.Data.Plural }}
|
||||
{{- if not $title }}
|
||||
{{- $title = .Data.Singular | humanize }}
|
||||
{{- $title = $to.Data.Plural | humanize }}
|
||||
{{- end }}
|
||||
{{- else if eq .Kind "term" }}
|
||||
{{- $title = i18n $to.Data.Singular }}
|
||||
{{- if not $title }}
|
||||
{{- $title = $to.Data.Singular | humanize }}
|
||||
{{- end }}
|
||||
{{- $title = printf "%s %s %s" $title (default "::" .Site.Params.titleSeparator) $to.Title }}
|
||||
{{- end }}
|
||||
|
|
Loading…
Reference in a new issue