summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan Pablo Valencia <juan.valencia10a@gmail.com>2024-11-18 20:10:08 +0200
committerJuan Pablo Valencia <juan.valencia10a@gmail.com>2024-11-18 20:10:31 +0200
commit31e6feecc09794795432b552e076aae7b71a9cd8 (patch)
tree687a42b8dffbd5ef85875ad8aa35d3d25497b4ac
parentf025f972e0b1ffb8df288be632bb3c34a58b66e8 (diff)
adding support for translating dates
-rw-r--r--hugo.toml1
-rw-r--r--layouts/partials/post-entry.html2
2 files changed, 2 insertions, 1 deletions
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 }}
- <p class="line-date">{{ .Date.Format $dateFormat }} </p>
+ <p class="line-date">{{ .Date | time.Format $dateFormat }} </p>
<div>
<p class="line-title">