From ab1714b799cca72df0f2a2e12164cdd18eb3ae54 Mon Sep 17 00:00:00 2001 From: DaMoo Date: Thu, 7 Mar 2019 14:31:02 -0500 Subject: [PATCH] Add configuration option to change date format --- README.md | 2 ++ exampleSite/config.toml | 2 ++ layouts/_default/list.html | 2 +- layouts/_default/single.html | 2 +- 4 files changed, 6 insertions(+), 2 deletions(-) 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 }}

{{ with .Params.Author }}{{ 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 @@