list, index : show reading time

if Params.ShowReadingTime = true
This commit is contained in:
Aditya Telange 2020-07-26 19:15:58 +05:30
parent 880ce9bf68
commit ea129c608d
2 changed files with 4 additions and 0 deletions

View File

@ -32,6 +32,8 @@
</section> </section>
<footer class="entry-footer"> <footer class="entry-footer">
<time>{{ .Date.Format "January 2, 2006" }}</time> <time>{{ .Date.Format "January 2, 2006" }}</time>
{{ if $.Site.Params.ShowReadingTime }} .
{{ .ReadingTime }}{{ $.Site.Params.MinuteReadingTime | default "min read" }}{{ end }}
</footer> </footer>
<a class="entry-link" href="{{ .Permalink }}"></a> <a class="entry-link" href="{{ .Permalink }}"></a>
</article> </article>

View File

@ -27,6 +27,8 @@
</section> </section>
<footer class="entry-footer"> <footer class="entry-footer">
<time>{{ .Date.Format "January 2, 2006" }}</time> <time>{{ .Date.Format "January 2, 2006" }}</time>
{{ if $.Site.Params.ShowReadingTime }} .
{{ .ReadingTime }}{{ $.Site.Params.MinuteReadingTime | default "min read" }}{{ end }}
</footer> </footer>
<a class="entry-link" href="{{ .Permalink }}"></a> <a class="entry-link" href="{{ .Permalink }}"></a>
</article> </article>