Add reading time

This commit is contained in:
BernatBC 2023-07-30 22:12:38 +02:00
parent 8f2d583ab6
commit 51d28300e4
4 changed files with 6 additions and 3 deletions

View file

@ -19,7 +19,7 @@
</ul>
</div>
{{ end }}
<span class="float-left">{{ .Date.Format "January 2, 2006" }}</span>
<span class="float-left">{{ .Date.Format "January 2, 2006" }}{{ if site.Params.features.readingTime }} | {{ .ReadingTime }} minute{{ if (ne .ReadingTime 1) }}s{{ end }}{{end}}</span>
<a
href="{{ .RelPermalink | relLangURL }}"
class="float-right btn btn-outline-info btn-sm"

View file

@ -21,7 +21,7 @@
</ul>
</div>
{{ end }}
<span class="float-left">{{ .Date.Format "January 2, 2006" }}</span>
<span class="float-left">{{ .Date.Format "January 2, 2006" }}{{ if site.Params.features.readingTime }} | {{ .ReadingTime }} minute{{ if (ne .ReadingTime 1) }}s{{ end }}{{end}}</span>
<a href="{{ .RelPermalink }}" title="{{ i18n "read" }}" class="float-right btn btn-outline-info btn-sm">{{ i18n "read" }}</a>
</div>
</div>