diff options
author | guangmean <angularcorp@outlook.com> | 2019-01-23 05:21:37 +0300 |
---|---|---|
committer | guangmean <angularcorp@outlook.com> | 2019-01-23 05:21:37 +0300 |
commit | ee4646c71f3b635eea6b38ba6aab83eb9dc7f2d5 (patch) | |
tree | 6ae16317e297daf4b901188651cf1918d47163c9 | |
parent | 76c4e76c88fab22f5a43cc7f7b0d5e0220f0149a (diff) |
Fix date format issue
Fix the issue "dateFormat: unable to cast of type to Time"
-rw-r--r-- | layouts/index.html | 2 | ||||
-rw-r--r-- | layouts/post/single.html | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/layouts/index.html b/layouts/index.html index ef6a0ec..c9eaf77 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -23,7 +23,7 @@ <article> <h3><a href="{{ .RelPermalink }}">➔ {{ .Title }}</a></h3> <div class="less"> - <time>Published: {{ dateFormat "Monday, Jan 2, 2006" .Params.date }}</time> | {{ .ReadingTime }} minute read + <time>Published: {{ .PublishDate.Format "Monday, Jan 2, 2006" }}</time> | {{ .ReadingTime }} minute read </div> <div class="em">{{ .Summary }}</div> {{ if .Truncated }} diff --git a/layouts/post/single.html b/layouts/post/single.html index 0d5d9c6..608830a 100644 --- a/layouts/post/single.html +++ b/layouts/post/single.html @@ -23,7 +23,7 @@ <article> <h3>{{ .Title }}</h3> <div class="less"> - <time>Published: {{ dateFormat "Monday, Jan 2, 2006" .Params.date }}</time> | {{ .ReadingTime }} minute read | Using {{ .WordCount }} words + <time>Published: {{ .PublishDate.Format "Monday, Jan 2, 2006" }}</time> | {{ .ReadingTime }} minute read | Using {{ .WordCount }} words </div> <div class="em">{{ .Content | safeHTML }}</div> <br /> |