Add article pagination links and display params

This commit is contained in:
James Panther
2021-08-14 14:44:34 +10:00
parent 074b1ff11d
commit c24b8ab2e1
9 changed files with 114 additions and 40 deletions
+18
View File
@@ -0,0 +1,18 @@
{{ if .Site.Params.article.showDate | default true }}
<time datetime="{{ .Date }}">
{{ .Date.Format .Site.Params.article.dateFormat | default "2 January 2006" }}
</time>
{{ end }}
{{ if and
(.Site.Params.article.showDate | default true)
(.Site.Params.article.showReadingTime | default true)
(ne .ReadingTime 0)
}}
<span class="px-1">&middot;</span>
{{ end }}
{{ if and (.Site.Params.article.showReadingTime | default true) (ne .ReadingTime 0) }}
<span title="Reading time">
{{ .ReadingTime }}
min{{ if gt .ReadingTime 1 }}s{{ end }}
</span>
{{ end }}