diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 78ffb75..43cd18b 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -19,8 +19,8 @@ hasCJKLanguage = true Profiles, backgrounds, favorite things etc. """ publicationYear = "2019" - listPageDateFormat = "January, 2006" # See https://gohugo.io/functions/format/ - singlePageDateFormat = "January 2, 2006" + # listPageDateFormat = "January, 2006" # See https://gohugo.io/functions/format/ + # singlePageDateFormat = "January 2, 2006" # custom_css = ["/css/custom.css"] # custom_js = ["/js/custom.js"] diff --git a/layouts/_default/list.html b/layouts/_default/list.html index fb53e88..f98242d 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -9,7 +9,8 @@
{{ .Date.Format .Site.Params.singlePageDateFormat }}
+ {{ $singlePageDateFormat := .Site.Params.singlePageDateFormat | default "January 2, 2006"}} +{{ .Date.Format $singlePageDateFormat }}