Add modified time, fix translations, make reading time optional
This commit is contained in:
parent
9d53238842
commit
e0a5a06ce1
10 changed files with 28 additions and 3 deletions
|
|
@ -1,6 +1,14 @@
|
|||
<span class="post-meta">
|
||||
<i class="fa fa-calendar-o"></i> {{ default (i18n "dateFormat") .Site.Params.dateformat | .Date.Format | i18n "postedOnDate" }}
|
||||
| <i class="fa fa-clock-o"></i>{{ i18n "readingTime"}} {{ .ReadingTime }} {{ i18n "readTime" }} ({{ .WordCount }} {{ i18n "words" }})
|
||||
{{ $lastmodstr := default (i18n "dateFormat") .Site.Params.dateformat | .Lastmod.Format }}
|
||||
{{ $datestr := default (i18n "dateFormat") .Site.Params.dateformat | .Date.Format }}
|
||||
<i class="fa fa-calendar-o"></i> {{ $datestr | i18n "postedOnDate"}}
|
||||
{{ if ne $datestr $lastmodstr }}
|
||||
{{ $lastmodstr | i18n "lastModified" }}
|
||||
{{ end }}
|
||||
{{ if .Params.readingTime }}
|
||||
|
|
||||
<i class="fa fa-clock-o"></i>{{ i18n "readingTime"}} {{ .ReadingTime }} {{ i18n "readTime" }} ({{ .WordCount }} {{ i18n "words" }})
|
||||
{{ end }}
|
||||
{{- if .Site.Params.staticman -}}
|
||||
| <i class="fa fa-comment-o"></i>
|
||||
{{ $slug := replace .URL "/" "" }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue