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

github.com/guangmean/Niello.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorguangmean <angularcorp@outlook.com>2019-01-23 05:21:37 +0300
committerguangmean <angularcorp@outlook.com>2019-01-23 05:21:37 +0300
commitee4646c71f3b635eea6b38ba6aab83eb9dc7f2d5 (patch)
tree6ae16317e297daf4b901188651cf1918d47163c9
parent76c4e76c88fab22f5a43cc7f7b0d5e0220f0149a (diff)
Fix date format issue
Fix the issue "dateFormat: unable to cast of type to Time"
-rw-r--r--layouts/index.html2
-rw-r--r--layouts/post/single.html2
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 }}">&#10132; {{ .Title }}</a></h3>
<div class="less">
- <time>Published: {{ dateFormat "Monday, Jan 2, 2006" .Params.date }}</time>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;{{ .ReadingTime }} minute read
+ <time>Published: {{ .PublishDate.Format "Monday, Jan 2, 2006" }}</time>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;{{ .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>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;{{ .ReadingTime }} minute read&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;Using {{ .WordCount }} words
+ <time>Published: {{ .PublishDate.Format "Monday, Jan 2, 2006" }}</time>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;{{ .ReadingTime }} minute read&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;Using {{ .WordCount }} words
</div>
<div class="em">{{ .Content | safeHTML }}</div>
<br />