1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-12-28 19:12:10 +00:00
seirdy.one/layouts/partials/wordcount.html
Rohan Kumar 497d5da5a3
word count in post lists + add qualitative desc.
- Add qualitative description to reading time
- Add word count + reading time to post list
2022-05-15 17:38:30 -07:00

4 lines
341 B
HTML

<span itemprop="wordCount">{{ .WordCount }}</span> words
{{- with .ReadingTime }},
a{{ if lt . 10 }} short{{ else if and (gt . 20) (lt . 30) }} somewhat long{{ else if and (gt . 29) (lt . 60) }} long{{ else if gt . 59 }} very long{{ end }}
<time itemprop="timeRequired" datetime="PT{{ . }}M">{{ . }} minute</time> read{{- end }}