i18n for page title and breadcrumbs

This commit is contained in:
liulj 2024-11-05 11:47:08 +08:00
parent c119b71f94
commit cfa11d7183
3 changed files with 2 additions and 5 deletions

View File

@ -32,9 +32,6 @@
- id: code_copied
translation: "已复制!"
- id: articles
translation: "所有文章"
- id: Series
translation: "合集"

View File

@ -11,7 +11,7 @@
{{- $bc_pg := site.GetPage ($scratch.Get "path") -}}
{{- if (and ($bc_pg) (gt (len . ) 0))}}
{{- print "&nbsp;»&nbsp;" | safeHTML -}}<a href="{{ $bc_pg.Permalink }}">{{ i18n $bc_pg.Name }}</a>
{{- print "&nbsp;»&nbsp;" | safeHTML -}}<a href="{{ $bc_pg.Permalink }}">{{ i18n $bc_pg.Name | default $bc_pg.Name }}</a>
{{- end }}
{{- end -}}

View File

@ -8,7 +8,7 @@
{{- end }}
{{- /* Title */}}
<title>{{ if .IsHome }}{{ else }}{{ if .Title }}{{ .Title }} | {{ end }}{{ end }}{{ site.Title }}</title>
<title>{{ if .IsHome }}{{ else }}{{ if .Title }}{{ i18n .Title | default .Title }} | {{ end }}{{ end }}{{ site.Title }}</title>
{{- /* Meta */}}
{{- if .IsHome }}