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 }}
|
{{- if not $title }}
|
||||||
{{- $title = .Data.Singular | humanize }}
|
{{- $title = .Data.Singular | humanize }}
|
||||||
{{- end }}
|
{{- 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>
|
<h1 id="{{ $title | anchorize }}">{{ $title }}</h1>
|
||||||
<ul class="columnize">
|
<ul class="columnize">
|
||||||
{{- range sort .Pages "Title" }}
|
{{- range sort .Pages "Title" }}
|
||||||
|
|
|
@ -13,6 +13,11 @@
|
||||||
{{- $title := .Title }}
|
{{- $title := .Title }}
|
||||||
{{- if eq $outputFormat "searchpage" }}
|
{{- if eq $outputFormat "searchpage" }}
|
||||||
{{- $title = T "Search" }}
|
{{- $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" }}
|
{{- else if eq .Kind "term" }}
|
||||||
{{- $title = i18n .Data.Singular }}
|
{{- $title = i18n .Data.Singular }}
|
||||||
{{- if not $title }}
|
{{- if not $title }}
|
||||||
|
@ -179,10 +184,15 @@
|
||||||
{{- if $ispublished }}
|
{{- if $ispublished }}
|
||||||
{{- $depth = add $depth 1 }}
|
{{- $depth = add $depth 1 }}
|
||||||
{{- $title := $to.Title }}
|
{{- $title := $to.Title }}
|
||||||
{{- if eq .Kind "term" }}
|
{{- if eq .Kind "taxonomy" }}
|
||||||
{{- $title = i18n .Data.Singular }}
|
{{- $title = i18n $to.Data.Plural }}
|
||||||
{{- if not $title }}
|
{{- 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 }}
|
{{- end }}
|
||||||
{{- $title = printf "%s %s %s" $title (default "::" .Site.Params.titleSeparator) $to.Title }}
|
{{- $title = printf "%s %s %s" $title (default "::" .Site.Params.titleSeparator) $to.Title }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
Loading…
Reference in a new issue