Add “no" localization

Only print a "by" for some languages
Add "by" template for easy overwrite
This commit is contained in:
Regis Philibert 2022-04-07 13:32:12 -04:00
parent 84011f418d
commit ea43359ed7
3 changed files with 13 additions and 7 deletions

View File

@ -10,6 +10,9 @@ other = "Nyeste {{.Title }}"
[readMore] [readMore]
other = "Les mer" other = "Les mer"
[by]
other = "Av"
[whatsInThis] [whatsInThis]
other = "Innhold av {{ .Type }}" other = "Innhold av {{ .Type }}"

3
layouts/_default/by.html Normal file
View File

@ -0,0 +1,3 @@
{{- if eq .Lang "de" "en" "es" "fr" "it" "no" "pt" -}}
{{- i18n "by" -}}
{{ end -}}

View File

@ -20,12 +20,12 @@
</h1> </h1>
{{ with .Params.author | default .Site.Params.author }} {{ with .Params.author | default .Site.Params.author }}
<p class="tracked"> <p class="tracked">
{{ i18n "by" }} <strong> {{ $.Render "by" }} <strong>
{{ if reflect.IsSlice . }} {{- if reflect.IsSlice . -}}
{{ delimit . ", " | markdownify }} {{ delimit . ", " | markdownify }}
{{else}} {{- else -}}
{{ . | markdownify }} {{ . | markdownify }}
{{ end }} {{- end -}}
</strong> </strong>
</p> </p>
{{ end }} {{ end }}