From 31e6feecc09794795432b552e076aae7b71a9cd8 Mon Sep 17 00:00:00 2001 From: Juan Pablo Valencia Date: Mon, 18 Nov 2024 20:10:08 +0200 Subject: adding support for translating dates --- hugo.toml | 1 + layouts/partials/post-entry.html | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/hugo.toml b/hugo.toml index 0456687..709ba78 100644 --- a/hugo.toml +++ b/hugo.toml @@ -1,5 +1,6 @@ baseURL = 'https://example.org/' languageCode = 'en-us' +defaultContentLanguage = 'en-us' title = 'typo' [module] diff --git a/layouts/partials/post-entry.html b/layouts/partials/post-entry.html index 2439632..1f57f23 100644 --- a/layouts/partials/post-entry.html +++ b/layouts/partials/post-entry.html @@ -5,7 +5,7 @@ {{ $dateFormat = .}} {{ end }} -

{{ .Date.Format $dateFormat }}

+

{{ .Date | time.Format $dateFormat }}

-- cgit v1.2.3