Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/shenoybr/hugo-goa.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCristóbal Alcázar <alcazar.cristobal90@gmail.com>2022-08-01 13:12:56 +0300
committerGitHub <noreply@github.com>2022-08-01 13:12:56 +0300
commit22581c258f9961fcb88c3eb5ff703b13a6d46b58 (patch)
tree7894ea3d010d26e278e2e3e52e42ed5c7620133c
parenta7b5acd5b846d7008621b68858ae4922d530d5c4 (diff)
Add number of minutes to read: list + content (#103)
-rw-r--r--layouts/partials/content.html1
-rw-r--r--layouts/partials/li.html1
2 files changed, 2 insertions, 0 deletions
diff --git a/layouts/partials/content.html b/layouts/partials/content.html
index 784dd41..f3b719e 100644
--- a/layouts/partials/content.html
+++ b/layouts/partials/content.html
@@ -6,6 +6,7 @@
<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 }}
diff --git a/layouts/partials/li.html b/layouts/partials/li.html
index 3372676..2d2d42a 100644
--- a/layouts/partials/li.html
+++ b/layouts/partials/li.html
@@ -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 }}