From 8d5175ef4571ead3ca8262383caef16e3c538124 Mon Sep 17 00:00:00 2001 From: Urm3l Date: Mon, 25 Mar 2019 16:14:21 +0100 Subject: Add dateFormat param (#56) * Add dateFormat param * Add DateForm to config-prod * Rename DateForm to DateFormat * Bump minor version to 4.3.0 --- exampleSite/config-prod.toml | 3 +++ exampleSite/config.toml | 3 +++ layouts/_default/single.html | 2 +- layouts/partials/posts/featured.html | 2 +- layouts/partials/posts/list.html | 2 +- package-lock.json | 2 +- package.json | 2 +- 7 files changed, 11 insertions(+), 5 deletions(-) diff --git a/exampleSite/config-prod.toml b/exampleSite/config-prod.toml index f51aaf0..6373b92 100644 --- a/exampleSite/config-prod.toml +++ b/exampleSite/config-prod.toml @@ -24,3 +24,6 @@ disqusShortname = "" #[languages.fr] # languageName = "Français" # title = "Massively - Version Française" + +#[params] + #DateFormat = "2.1.2006" \ No newline at end of file diff --git a/exampleSite/config.toml b/exampleSite/config.toml index a3341a0..fc0dfba 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -24,3 +24,6 @@ disqusShortname = "" #[languages.fr] # languageName = "Français" # title = "Massively - Version Française" + +# [params] +# DateFormat = "2.1.2006" \ No newline at end of file diff --git a/layouts/_default/single.html b/layouts/_default/single.html index cae3cea..52a0c88 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -14,7 +14,7 @@
{{ if not .Date.IsZero }} - {{ .Date.Format "January 2, 2006" }} + {{ .Date.Format (.Site.Params.DateFormat | default "January 2, 2006") }} {{ end }}

{{ .Title }}

{{ .Description }}

diff --git a/layouts/partials/posts/featured.html b/layouts/partials/posts/featured.html index 1a03c76..0ad0203 100644 --- a/layouts/partials/posts/featured.html +++ b/layouts/partials/posts/featured.html @@ -4,7 +4,7 @@
{{ if not .Date.IsZero }} - {{ .Date.Format "January 2, 2006" }} + {{ .Date.Format (.Site.Params.DateFormat | default "January 2, 2006") }} {{ end }}

{{ .Title }}

{{ .Description }}

diff --git a/layouts/partials/posts/list.html b/layouts/partials/posts/list.html index 8bce904..72c4063 100644 --- a/layouts/partials/posts/list.html +++ b/layouts/partials/posts/list.html @@ -5,7 +5,7 @@
{{ if not .Date.IsZero }} - {{ .Date.Format "January 2, 2006" }} + {{ .Date.Format (.Site.Params.DateFormat | default "January 2, 2006") }} {{ end }}

{{ .Title }}

diff --git a/package-lock.json b/package-lock.json index df45b72..0fb0cf9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,5 +1,5 @@ { "name": "hugo-theme-massively", - "version": "4.2.2", + "version": "4.3.0", "lockfileVersion": 1 } diff --git a/package.json b/package.json index 577dc01..db6f344 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hugo-theme-massively", - "version": "4.2.2", + "version": "4.3.0", "description": "HTML5 UP theme Massively for Hugo", "main": "index.js", "scripts": { -- cgit v1.2.3