aboutsummaryrefslogtreecommitdiffstats
path: root/layouts/_default
diff options
context:
space:
mode:
authorOscar Najera <hi@oscarnajera.com>2024-12-28 03:32:36 +0100
committerOscar Najera <hi@oscarnajera.com>2024-12-28 03:32:36 +0100
commitad38af9f73351d1e70e78615c09a0bd8f4e77357 (patch)
treed12faaf50edd27188d35afefb960d9754f82b18b /layouts/_default
parentcd2bdb86e66bdb609eeed6526d9b0235b16fd6bd (diff)
downloadhugo-minimalist-theme-ad38af9f73351d1e70e78615c09a0bd8f4e77357.tar.gz
hugo-minimalist-theme-ad38af9f73351d1e70e78615c09a0bd8f4e77357.tar.bz2
hugo-minimalist-theme-ad38af9f73351d1e70e78615c09a0bd8f4e77357.zip
Localize time
Diffstat (limited to 'layouts/_default')
-rw-r--r--layouts/_default/search.json4
1 files changed, 2 insertions, 2 deletions
diff --git a/layouts/_default/search.json b/layouts/_default/search.json
index 16912cb..9fae26d 100644
--- a/layouts/_default/search.json
+++ b/layouts/_default/search.json
@@ -1,5 +1,5 @@
-{{ $dateFormat := .Site.Params.dateFormat | default "Jan 2, 2006" }}
+{{ $dateFormat := .Site.Params.dateFormat | default ":date_medium" }}
{{- $.Scratch.Add "index" slice -}}
{{- range (where .Site.RegularPages "Type" "in" .Site.Params.mainSections) -}}
@@ -7,7 +7,7 @@
"tags" .Params.tags
"categories" .Params.categories
"contents" (.Summary | plainify)
- "date" (.Date.Format $dateFormat)
+ "date" (time.Format $dateFormat .Date)
"permalink" .Permalink) -}}
{{- end -}}
{{- $.Scratch.Get "index" | jsonify -}}