feat: add reading time to list page too
This commit is contained in:
parent
92b3bff53d
commit
2e5ddecd86
3 changed files with 9 additions and 1 deletions
|
@ -115,3 +115,9 @@ article {
|
|||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
hgroup {
|
||||
p {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,13 @@
|
|||
{{ define "main" }}
|
||||
<hgroup>
|
||||
<h1>{{ .Title }}</h1>
|
||||
{{ .Content }}
|
||||
</hgroup>
|
||||
{{ range .Pages }}
|
||||
<h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
|
||||
{{ $dateHuman := .Date.Format "January 2, 2006" }}
|
||||
{{ $dateMachine := .Date.Format "2006-01-02T15:04:05-07:00" }}
|
||||
<p><b>reading time:</b> {{ lower .ReadingTime }} mins</p>
|
||||
<p><b>first posted:</b> <time datetime="{{ $dateMachine }}">{{ lower $dateHuman }}</time></p>
|
||||
<caption><blockquote>{{ .Description }}</blockquote></caption>
|
||||
{{ end }}
|
||||
|
|
|
@ -17,6 +17,5 @@
|
|||
{{ .TableOfContents }}
|
||||
<hr>
|
||||
{{ .Content }}
|
||||
{{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }}
|
||||
</article>
|
||||
{{ end }}
|
||||
|
|
Loading…
Reference in a new issue