From 79bc62c532d6f69d517b89b3f5380850d0b1c824 Mon Sep 17 00:00:00 2001 From: Jordi Bares Date: Tue, 19 Mar 2019 22:45:01 +0000 Subject: [PATCH 1/2] Reconfigure date format --- layouts/_default/single.html | 2 +- layouts/partials/category.html | 2 +- layouts/partials/portfolio.html | 2 +- layouts/partials/tag.html | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 7764c2d..49f12ef 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -24,7 +24,7 @@ {{ end }}
- {{ .Date.Format "02 January" }} / + {{ .Date.Format .Site.Params.DateForm }} / diff --git a/layouts/partials/category.html b/layouts/partials/category.html index 10b2b01..8601935 100644 --- a/layouts/partials/category.html +++ b/layouts/partials/category.html @@ -38,7 +38,7 @@

Posts

- {{ .Date.Format "02 January" }} + {{ .Date.Format .Site.Params.DateForm }} diff --git a/layouts/partials/portfolio.html b/layouts/partials/portfolio.html index a3e3c35..5cc1115 100644 --- a/layouts/partials/portfolio.html +++ b/layouts/partials/portfolio.html @@ -28,7 +28,7 @@

Posts

{{ end }}
- {{ .Date.Format "02 January" }} + {{ .Date.Format .Site.Params.DateForm }} {{ if and (isset .Site.Params "authorlink") .Site.Params.authorLink }} {{ if and (isset .Site.Params "author") .Site.Params.author }} diff --git a/layouts/partials/tag.html b/layouts/partials/tag.html index ad8fef7..5445aff 100644 --- a/layouts/partials/tag.html +++ b/layouts/partials/tag.html @@ -32,7 +32,7 @@

Posts

- {{ .Date.Format "02 January 2006" }} / + {{ .Date.Format .Site.Params.DateForm }} / {{ if and (isset .Site.Params "author") .Site.Params.author }} From 5c8f80f42d1f9a0370a2ca3575a851939c0c4212 Mon Sep 17 00:00:00 2001 From: Jordi Bares Date: Wed, 20 Mar 2019 11:58:45 +0000 Subject: [PATCH 2/2] Configure examplesite with the new DateForm --- exampleSite/config.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 84d6cdc..f6423a0 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -36,6 +36,10 @@ paginate = 5 #frontpage pagination "A port of Tracks by Compete Themes." ] + # Set the date formatting as required, comment/uncomment as required + DateForm = "2 January" + # DateForm = "2 January 2006" + # Contact page # Since this template is static, the contact form uses www.formspree.io as a