diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 1dc76dc..7b64fd3 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -15,7 +15,7 @@ theme = "hyde-hyde" title = "Title" # description = "..." authorimage = "/img/hugo.png" - dateformat = "Jan 1, 2006" + dateformat = "Jan 2, 2006" highlightjs = true # highlightjsstyle = "github" diff --git a/layouts/index.html b/layouts/index.html index c5f07b3..76485e9 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -7,7 +7,13 @@ {{ range where .Data.Pages "Type" "posts" }}

{{ .Title }}

- {{ .Date.Format "Mon, Jan 2, 2006" }} + + {{- if isset .Site.Params "dateformat" -}} + {{ .Date.Format .Site.Params.dateformat }} + {{- else -}} + {{ .Date.Format "Jan 02 2006" }} + {{- end -}} + {{ .Summary }} {{ if .Truncated }}