diff --git a/config.yaml b/config.yaml index 1f388d9a9ffbcc36b2fe525d896fa6cd350ca9d3..a931be1924db1218ca5f16f74d599c849fb62837 100644 --- a/config.yaml +++ b/config.yaml @@ -9,6 +9,7 @@ params: plausible: posts: default_image: false + date_format: ":date_long" index: show_categories: false show_author: false diff --git a/layouts/partials/blocks/templates/posts/highlight.html b/layouts/partials/blocks/templates/posts/highlight.html index 3e1f8d8b48806f156c450d6c622ac12a4c20c3f0..f7f857bba321da834051c97eb5e6d669eaa79bcc 100644 --- a/layouts/partials/blocks/templates/posts/highlight.html +++ b/layouts/partials/blocks/templates/posts/highlight.html @@ -38,7 +38,7 @@ {{- end -}} <div class="post-meta"> - <time itemprop="datePublished" datetime="{{ .Date.Format "2006-01-02T15:04" }}">{{ .Date | time.Format ":date_long" }}</time> + <time itemprop="datePublished" datetime="{{ .Date.Format "2006-01-02T15:04" }}">{{ .Date | time.Format site.Params.posts.date_format }}</time> {{ if site.Params.posts.index.show_author }} {{- partial "posts/author" . -}} {{ end }} diff --git a/layouts/partials/posts/post-infos.html b/layouts/partials/posts/post-infos.html index 4c576b7dbcc8d881656b8f58f5be71309115e204..c47936dda1e6d5fd3d4b50a888675cfde4f3d05c 100644 --- a/layouts/partials/posts/post-infos.html +++ b/layouts/partials/posts/post-infos.html @@ -13,7 +13,7 @@ {{ end }} <li> <span>{{ i18n "posts.date" }}</span> - <time datetime="{{ .Date.Format "2006-01-02T15:04" }}">{{ .Date | time.Format ":date_long" }}</time> + <time datetime="{{ .Date.Format "2006-01-02T15:04" }}">{{ .Date | time.Format site.Params.posts.date_format }}</time> </li> {{ range .GetTerms "authors" }} <li> diff --git a/layouts/partials/posts/post.html b/layouts/partials/posts/post.html index e1dcc3b64b72824063435cdd1c26e746e154174c..37da4637923dd4d7af3bd3e8952be9a36bdfa229 100644 --- a/layouts/partials/posts/post.html +++ b/layouts/partials/posts/post.html @@ -32,7 +32,7 @@ {{- end -}} <div class="post-meta"> - <time itemprop="datePublished" datetime="{{ .Date.Format "2006-01-02T15:04" }}">{{ .Date | time.Format ":date_long" }}</time> + <time itemprop="datePublished" datetime="{{ .Date.Format "2006-01-02T15:04" }}">{{ .Date | time.Format site.Params.posts.date_format }}</time> {{ if site.Params.posts.index.show_author }} {{- partial "posts/author" . -}} {{ end }}