Skip to content

Commit

Permalink
Add number of minutes to read: list + content (#103)
Browse files Browse the repository at this point in the history
  • Loading branch information
alcazar90 authored Aug 1, 2022
1 parent a7b5acd commit 22581c2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions layouts/partials/content.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ <h1 class="title">{{ .Title }}</h1>
<div class="col-md-12">
<h6 class="text-left meta">
{{ if not .Date.IsZero }} PUBLISHED ON {{ .Date.Format .Site.Params.dateformat | upper }} {{end}}
/ {{ math.Round (div (countwords .Content) 220.0) }} MIN READ
{{ if isset .Params "categories" }}
{{ $total := len .Params.categories }}
{{ if gt $total 0 }}
Expand Down
1 change: 1 addition & 0 deletions layouts/partials/li.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<a class="list-entry-link" href="{{ .RelPermalink }}">{{ .Title }}</a>
<p class="meta">
{{ if not .Date.IsZero }} {{ .Date.Format .Site.Params.dateformat | upper }} {{end}}
- {{ math.Round (div (countwords .Content) 220.0) }} MIN READ
<span class="category">
{{ if isset .Params "categories" }}
{{ $total := len .Params.categories }}
Expand Down

0 comments on commit 22581c2

Please sign in to comment.