diff options
author | Giuseppe Pignataro <16869546+Fastbyte01@users.noreply.github.com> | 2021-05-10 23:31:17 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-10 23:31:17 +0300 |
commit | 94304cd7fbfddbdc5c57fd4e0e8e00de2884f85a (patch) | |
tree | e67118096eed5d49439bd4fc68565928bee38be8 | |
parent | 9f1434a881b143fd119e8cc55c05120c49fe5539 (diff) | |
parent | 010d9098c1d8bc42ce83e7c7e44a4ee2fe45583e (diff) |
Merge pull request #60 from Eumeryx/unified-date-format
added date format in config
-rw-r--r-- | exampleSite/config.toml | 3 | ||||
-rw-r--r-- | layouts/_default/list.html | 4 | ||||
-rw-r--r-- | layouts/_default/posts.html | 4 |
3 files changed, 6 insertions, 5 deletions
diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 408bac3..bf88440 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -45,7 +45,8 @@ disqusShortname = "yourdiscussshortname" subtitle = "A Hugo theme" # Subtitle cdn_url = "" # Base CDN URL home_mode = "" # post or other - + dateFormatToUse = "" # set date format, default "2 January 2006" + google_verification = "" bing_verification = "" yandex_verification = "" diff --git a/layouts/_default/list.html b/layouts/_default/list.html index d7362e4..d9bfec5 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -9,10 +9,10 @@ <article class="archive-item"> <a href="{{ .RelPermalink }}" class="archive-item-link">{{ .Title }}</a> <span class="archive-item-date"> - {{ .Date.Format "2 January 2006" }} + {{ .Date.Format (.Site.Params.dateFormatToUse | default "2 January 2006") }} </span> </article> {{ end }} {{ end }} {{ partial "paginator.html" . }} </div> -{{end }}
\ No newline at end of file +{{end }} diff --git a/layouts/_default/posts.html b/layouts/_default/posts.html index 3496be6..4781eae 100644 --- a/layouts/_default/posts.html +++ b/layouts/_default/posts.html @@ -9,10 +9,10 @@ <article class="archive-item"> <a href="{{ .RelPermalink }}" class="archive-item-link">{{ .Title }}</a> <span class="archive-item-date"> - {{ .Date.Format "2 January 2006" }} + {{ .Date.Format (.Site.Params.dateFormatToUse | default "2 January 2006") }} </span> </article> {{ end }} {{ end }} {{ partial "paginator.html" . }} </div> -{{end }}
\ No newline at end of file +{{end }} |