diff --git a/README.md b/README.md index ca131c9..1f542d8 100644 --- a/README.md +++ b/README.md @@ -97,6 +97,8 @@ paginate = 5 newerPosts = "Newer posts" olderPosts = "Older posts" minuteReadingTime = "min read" + dateFormatSingle = "2006-01-02" + dateFormatList = "2006-01-02" [languages.en.params.logo] logoText = "hello friend" diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 2d49a62..9ec00e9 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -26,6 +26,8 @@ paginate = 5 newerPosts = "Newer posts" olderPosts = "Older posts" minuteReadingTime = "min read" + dateFormatSingle = "2006-01-02" + dateFormatList = "2006-01-02" [languages.en.params.logo] logoText = "hello friend" diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 93eb8fc..eda29eb 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -9,7 +9,7 @@

{{ .Title | markdownify }}

- {{ .Date.Format "2006-01-02" }} + {{ .Date.Format ($.Site.Params.DateFormatList | default "2006-01-02") }} {{ with .Params.Author }}— {{ $.Site.Params.WrittenBy | default "Written by" }} {{ . }}{{ end }} {{ if $.Site.Params.ShowReadingTime }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 0a2a768..5ab166f 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -4,7 +4,7 @@
{{ with .Date | default nil }} {{ end }} {{ with .Params.Author }}{{ end }}