diff options
author | Miguel Simoni <miguel.simoni@gmail.com> | 2019-12-27 17:18:17 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-27 17:18:17 +0300 |
commit | 6099c6109436b2fcaaf9a30e4c3e7d699450e773 (patch) | |
tree | a003cca6dcf0412566b0cab07637f2d395da3b71 | |
parent | ddfa96c2f3052b1b98425562ffdf8b05d26c9a23 (diff) | |
parent | deb087332ffe9141038ec340f0dc3da97bd0bfca (diff) |
Merge pull request #29 from mhungerford/datetime_format_fix
Fixes dateFormat for hugo updates.
-rw-r--r-- | layouts/_default/list.html | 6 | ||||
-rw-r--r-- | layouts/_default/single.html | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/layouts/_default/list.html b/layouts/_default/list.html index c523ca0..c7abbc0 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -10,7 +10,11 @@ <article class="post"> <header class="entry-header"> <div class="entry-meta"> - <span class="posted-on"><time class="entry-date published" date="{{ .Date }}">{{ dateFormat .Site.Params.DateForm .Date }}</time></span> + <span class="posted-on"> + <time class="entry-date published" datetime="{{ .Date.Format .Site.Params.DateForm }}"> + {{- .Date.Format "January 2, 2006" -}} + </time> + </span> </div> <h1 class="entry-title"><a href="{{ .Permalink }}" rel="bookmark">{{ .Title }}</a></h1> </header> diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 2a22fd1..9c2a739 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -10,7 +10,11 @@ <article class="post"> <header class="entry-header"> <div class="entry-meta"> - <span class="posted-on"><time class="entry-date published" date="{{ .Date }}">{{ dateFormat .Site.Params.DateForm .Date }}</time></span> + <span class="posted-on"> + <time class="entry-date published" datetime="{{ .Date.Format .Site.Params.DateForm }}"> + {{- .Date.Format "January 2, 2006" -}} + </time> + </span> </div> <h1 class="entry-title"><a href="{{ .Permalink }}" rel="bookmark">{{ .Title }}</a></h1> </header> |