Add page reading time
This commit is contained in:
@@ -5,12 +5,17 @@
|
||||
{{ $gap := "mb-0" }}
|
||||
{{ $date := cond ($page.Param "paige.page.date.hide" | not) $page.PublishDate "" }}
|
||||
{{ $dateclass := $page.Param "paige.page.date.class" | default "text-center text-secondary" }}
|
||||
{{ $readingtime := $page.Param "paige.page.reading_time.show" }}
|
||||
{{ $readingtimeclass := $page.Param "paige.page.reading_time.class" | default "text-center text-secondary" }}
|
||||
|
||||
{{ with $authors }}
|
||||
<p class="{{ if $date }} {{ $gap }} {{ end }} {{ $authorsclass }}">{{ . }}</p>
|
||||
<p class="{{ if or $date $readingtime }} {{ $gap }} {{ end }} {{ $authorsclass }}">{{ . }}</p>
|
||||
{{ end }}
|
||||
{{ with $date }}
|
||||
<p class="{{ $dateclass }}">
|
||||
<p class="{{ if $readingtime }} {{ $gap }} {{ end }} {{ $dateclass }}">
|
||||
<time datetime="{{ .Format `2006-01-02` }}">{{ time.Format ($page.Param "paige.page.date.format" | default ":date_long") . }}</time>
|
||||
</p>
|
||||
{{ end }}
|
||||
{{ if $readingtime }}
|
||||
<p class="{{ $readingtimeclass }}">{{ $page.ReadingTime }} {{ i18n "paige_minutes" $page.ReadingTime }}</p>
|
||||
{{ end }}
|
||||
|
Reference in New Issue
Block a user