mirror of https://github.com/theNewDynamic/gohugo-theme-ananke.git

Regis Philibert
07.32.2022 ea43359ed79c412dba865780f1c8a4e641081cf0
Add “no" localization
Only print a "by" for some languages
Add "by" template for easy overwrite
1 files added
2 files modified
20 ■■■■■ changed files
i18n/no.toml 3 ●●●●● patch | view | raw | blame | history
layouts/_default/by.html 3 ●●●●● patch | view | raw | blame | history
layouts/_default/single.html 14 ●●●● patch | view | raw | blame | history
i18n/no.toml
@@ -10,6 +10,9 @@
[readMore]
other = "Les mer"
[by]
other = "Av"
[whatsInThis]
other = "Innhold av {{ .Type }}"
layouts/_default/by.html
New file
@@ -0,0 +1,3 @@
{{- if eq .Lang "de" "en" "es" "fr" "it" "no" "pt" -}}
{{- i18n "by" -}}
{{ end -}}
layouts/_default/single.html
@@ -20,13 +20,13 @@
      </h1>
      {{ with .Params.author | default .Site.Params.author }}
      <p class="tracked">
          {{ i18n "by" }} <strong>
          {{ if reflect.IsSlice . }}
              {{ delimit . ", " | markdownify }}
          {{else}}
              {{ . | markdownify }}
          {{ end }}
          </strong>
        {{ $.Render "by" }} <strong>
        {{- if reflect.IsSlice . -}}
            {{ delimit . ", " | markdownify }}
        {{- else -}}
            {{ . | markdownify }}
        {{- end -}}
        </strong>
      </p>
      {{ end }}
      {{/* Hugo uses Go's date formatting is set by example. Here are two formats */}}