Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/pavel-pi/kiss-em.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpavel <pavel.post@deutschebahn.com>2020-04-10 18:59:43 +0300
committerpavel <pavel.post@deutschebahn.com>2020-04-10 18:59:43 +0300
commit521baede571e83aa977f0b157abbeda22c8864ce (patch)
tree6506aa5224c35af463d9047936ce6d3f893cb826
parenteea91475b4680adfbc243584d28be1b6b0a6eed0 (diff)
german date on article and tags site
-rw-r--r--layouts/partials/article.html7
-rw-r--r--layouts/taxonomy/tag.html9
2 files changed, 14 insertions, 2 deletions
diff --git a/layouts/partials/article.html b/layouts/partials/article.html
index a0829ed..de3225e 100644
--- a/layouts/partials/article.html
+++ b/layouts/partials/article.html
@@ -8,7 +8,12 @@
<!-- Date above Article Title-->
{{if not .Date.IsZero }}
<h2 class="subtitle is-6">
- {{ .Date.Format "January 2, 2006" }}
+ <!-- Consider german month names -->
+ {{if eq .Site.Language.Lang "de" }}
+ {{ .Date.Day }}. {{ index $.Site.Data.monate (printf "%d" .Date.Month) }} {{ .Date.Year }}, {{ .Date.Format "15:04" }}
+ {{ else }}
+ {{ .Date.Format "January 2, 2006 | 15:04" }}
+ {{ end }}
</h2>
{{ end }}
diff --git a/layouts/taxonomy/tag.html b/layouts/taxonomy/tag.html
index 176e28b..3d1bce9 100644
--- a/layouts/taxonomy/tag.html
+++ b/layouts/taxonomy/tag.html
@@ -10,7 +10,14 @@
{{ partial "tags" .Params.tags }}
{{ end }}
</div>
- <h2 class="subtitle is-6 date">{{ .Date.Format "January 2, 2006" }}</h2>
+ <h2 class="subtitle is-6 date">
+ <!-- Consider german month names -->
+ {{if eq .Site.Language.Lang "de" }}
+ {{ .Date.Day }}. {{ index $.Site.Data.monate (printf "%d" .Date.Month) }} {{ .Date.Year }}, {{ .Date.Format "15:04" }}
+ {{ else }}
+ {{ .Date.Format "January 2, 2006 | 15:04" }}
+ {{ end }}
+ </h2>
<h1 class="title"><a href="{{ .Permalink }}">{{ .Title }}</a>{{ if .Draft }} ::Draft{{ end }}</h1>
<div class="content">
{{ .Summary | plainify | safeHTML }}