From b79cb616ea66819e065a436dec7ac8ef8c5034e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luiz=20de=20Pr=C3=A1?= Date: Fri, 14 Sep 2018 10:11:27 -0300 Subject: [PATCH] Add dateformat config --- exampleSite/config.toml | 2 ++ layouts/partials/list.html | 2 +- layouts/partials/post.html | 6 +++--- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 0a0f3fb..e3d93b4 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -22,6 +22,8 @@ disqusShortname = "yourdiscussshortname" avatarurl = "images/avatar.jpg" footercontent = "Enter a text here." + dateformat = "January 2, 2006" + hideCredits = false hideCopyright = false diff --git a/layouts/partials/list.html b/layouts/partials/list.html index f62516b..300ea6a 100644 --- a/layouts/partials/list.html +++ b/layouts/partials/list.html @@ -3,7 +3,7 @@ diff --git a/layouts/partials/post.html b/layouts/partials/post.html index a48aeed..e4eed5f 100644 --- a/layouts/partials/post.html +++ b/layouts/partials/post.html @@ -2,7 +2,7 @@

{{ .Title }}

-

{{ .Date.Format "January 2, 2006" }}

+

{{ .Date.Format (.Site.Params.dateFormat | default "January 2, 2006" ) }}

{{ if eq .Params.math "true" }}