diff options
author | Sanjay T. Sharma <sanjay.t.sharma@gmail.com> | 2017-09-24 17:56:55 +0100 |
---|---|---|
committer | olOwOlo <26087907+olOwOlo@users.noreply.github.com> | 2017-09-25 00:56:55 +0800 |
commit | ab7cdc5d3c20f03b1e22f4c201ba29af06d139cb (patch) | |
tree | 72c5097b037064188bfe5deed66bf58c490efa75 /layouts | |
parent | 271f73a87fe152978daea55e6cfe2a3b6f3530fb (diff) |
feat: provide the facility to customize date format (#10)
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/_default/taxonomy.html | 2 | ||||
-rw-r--r-- | layouts/partials/post/copyright.html | 2 | ||||
-rw-r--r-- | layouts/post/single.html | 2 | ||||
-rw-r--r-- | layouts/post/summary.html | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/layouts/_default/taxonomy.html b/layouts/_default/taxonomy.html index b2e4643..ec8a266 100644 --- a/layouts/_default/taxonomy.html +++ b/layouts/_default/taxonomy.html @@ -18,7 +18,7 @@ {{ range $paginator.Pages }} <div class="archive-post"> <span class="archive-post-time"> - {{ .Date.Format "2006-01-02" }} + {{ .Date.Format (.Site.Params.dateFormatToUse | default "2006-01-02") }} </span> <span class="archive-post-title"> <a href="{{ .URL }}" class="archive-post-link"> diff --git a/layouts/partials/post/copyright.html b/layouts/partials/post/copyright.html index 813da5a..cbaefb7 100644 --- a/layouts/partials/post/copyright.html +++ b/layouts/partials/post/copyright.html @@ -7,7 +7,7 @@ </p> <p class="copyright-item"> <span class="item-title">{{ $lang.copyright.lastMod }}</span> - <span class="item-content">{{ .Lastmod.Format "2006-01-02" }}</span> + <span class="item-content">{{ .Lastmod.Format (.Site.Params.dateFormatToUse | default "2006-01-02") }}</span> </p> {{ if $.Site.Params.linkToMarkDown -}} {{ with $.OutputFormats.Get "markdown" -}} diff --git a/layouts/post/single.html b/layouts/post/single.html index da83b70..7960c64 100644 --- a/layouts/post/single.html +++ b/layouts/post/single.html @@ -6,7 +6,7 @@ <h1 class="post-title">{{ .Title }}</h1> <div class="post-meta"> - <span class="post-time"> {{ .Date.Format "2006-01-02" }} </span> + <span class="post-time"> {{ .Date.Format (.Site.Params.dateFormatToUse | default "2006-01-02") }} </span> {{ with .Params.categories -}} <div class="post-category"> {{ range . -}} diff --git a/layouts/post/summary.html b/layouts/post/summary.html index 2cdb7b3..be4366b 100644 --- a/layouts/post/summary.html +++ b/layouts/post/summary.html @@ -3,7 +3,7 @@ <header class="post-header"> <h1 class="post-title"><a class="post-link" href="{{ .URL }}">{{ .Title }}</a></h1> <div class="post-meta"> - <span class="post-time"> {{ .Date.Format "2006-01-02" }} </span> + <span class="post-time"> {{ .Date.Format (.Site.Params.dateFormatToUse | default "2006-01-02") }} </span> {{ with .Params.categories -}} <div class="post-category"> {{ range . -}} |