added translation

This commit is contained in:
Vrifox 2021-05-24 22:24:58 +02:00
parent 47cd614136
commit 5dca124b24
Signed by: vrifox
GPG key ID: D40098E5B60B2197
4 changed files with 25 additions and 5 deletions

View file

@ -1,9 +1,15 @@
baseURL: https://vrifox.cc/ baseURL: https://vrifox.cc/
languages:
en:
languageName: English
languageCode: en-us languageCode: en-us
weight: 1
de:
languageName: Deutsch
languageCode: de-de
weight: 2
title: "Vri's Cute Corner" title: "Vri's Cute Corner"
enableRobotsTXT: true enableRobotsTXT: true
params:
menuname: vrifox.cc
menu: menu:
name: name:
- identifier: vrifox.cc - identifier: vrifox.cc
@ -58,3 +64,5 @@ markup:
goldmark: goldmark:
extensions: extensions:
linkify: false linkify: false
renderer:
unsafe: true

12
data/monate.yaml Normal file
View file

@ -0,0 +1,12 @@
1: "Januar"
2: "Februar"
3: "März"
4: "April"
5: "Mai"
6: "Juni"
7: "Juli"
8: "August"
9: "September"
10: "Oktober"
11: "November"
12: "Dezember"

View file

@ -9,7 +9,7 @@
<main> <main>
<h1 class="title">{{ .Title }}</h1> <h1 class="title">{{ .Title }}</h1>
{{- range .Pages }} {{- range .Pages }}
<p> <a href="{{ .Permalink }}">{{ .Title }}</a> <span>{{ .Date.Format "2 January 2006" }}</span> </p> <p> <a href="{{ .Permalink }}">{{ .Title }}</a> <span>{{ .Date.Day }}. {{ if eq .Params.lang "de"}} {{ index $.Site.Data.monate (printf "%d" .Date.Month) }} {{ else }} {{ .Date.Month }} {{ end }} {{ .Date.Year }}</span> </p>
{{- end }} {{- end }}
</main> </main>

View file

@ -1,7 +1,7 @@
{{- define "main" }} {{- define "main" }}
<main> <main>
{{- if eq .Params.type "post" }} {{- if eq .Params.type "post" }}
<p class="date-published" title="{{ .Date.Format "2. January 2006, 15:04 MST" }}">{{ .Date.Format "2. January 2006" }}</p> <p class="date-published" title="{{ .Date.Format "2. January 2006, 15:04 MST" }}">{{ .Date.Day }}. {{ if eq .Params.lang "de"}} {{ index $.Site.Data.monate (printf "%d" .Date.Month) }} {{ else }} {{ .Date.Month }} {{ end }} {{ .Date.Year }}</p>
{{- end }} {{- end }}
<h1 class="title">{{ .Title }}</h1> <h1 class="title">{{ .Title }}</h1>
{{ .Content -}} {{ .Content -}}