Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/curttimson/hugo-theme-massively.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUrm3l <t.fabritz@gmail.com>2019-03-25 18:14:21 +0300
committerCurtis Timson <curt@live.co.uk>2019-03-25 18:14:21 +0300
commit8d5175ef4571ead3ca8262383caef16e3c538124 (patch)
tree8473c83c15c36a6ce8a05fc337c70e41b407aec7
parent3546f3d911687eb57356f92409daed9d9ceab160 (diff)
Add dateFormat param (#56)4.3.0
* Add dateFormat param * Add DateForm to config-prod * Rename DateForm to DateFormat * Bump minor version to 4.3.0
-rw-r--r--exampleSite/config-prod.toml3
-rw-r--r--exampleSite/config.toml3
-rw-r--r--layouts/_default/single.html2
-rw-r--r--layouts/partials/posts/featured.html2
-rw-r--r--layouts/partials/posts/list.html2
-rw-r--r--package-lock.json2
-rw-r--r--package.json2
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 @@
<section class="post">
<header class="major">
{{ if not .Date.IsZero }}
- <span class="date">{{ .Date.Format "January 2, 2006" }}</span>
+ <span class="date">{{ .Date.Format (.Site.Params.DateFormat | default "January 2, 2006") }}</span>
{{ end }}
<h1>{{ .Title }}</h1>
<p>{{ .Description }}</p>
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 @@
<article class="post featured">
<header class="major">
{{ if not .Date.IsZero }}
- <span class="date">{{ .Date.Format "January 2, 2006" }}</span>
+ <span class="date">{{ .Date.Format (.Site.Params.DateFormat | default "January 2, 2006") }}</span>
{{ end }}
<h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
<p>{{ .Description }}</p>
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 @@
<article>
<header>
{{ if not .Date.IsZero }}
- <span class="date">{{ .Date.Format "January 2, 2006" }}</span>
+ <span class="date">{{ .Date.Format (.Site.Params.DateFormat | default "January 2, 2006") }}</span>
{{ end }}
<h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
</header>
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": {