diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml index ceb7416..b39a535 100644 --- a/exampleSite/config.yaml +++ b/exampleSite/config.yaml @@ -264,6 +264,9 @@ params: plyr: # options doc: https://github.com/sampotts/plyr#options # fullscreen: true + + readingTime: + enable: true # Provide footer configuration. diff --git a/layouts/_default/single.html b/layouts/_default/single.html index a98f180..b215fdf 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -39,7 +39,7 @@
Author Image
{{ partial "helpers/get-author-name.html" . }}
-

{{ .Page.Date | time.Format ":date_full" }}

+

{{ .Page.Date | time.Format ":date_full" }}{{ if site.Params.features.readingTime }} | {{ .ReadingTime }} minute{{ if (ne .ReadingTime 1) }}s{{ end }}{{end}}

diff --git a/layouts/partials/cards/post.html b/layouts/partials/cards/post.html index 200cf84..8facc41 100644 --- a/layouts/partials/cards/post.html +++ b/layouts/partials/cards/post.html @@ -19,7 +19,7 @@
{{ end }} - {{ .Date.Format "January 2, 2006" }} + {{ .Date.Format "January 2, 2006" }}{{ if site.Params.features.readingTime }} | {{ .ReadingTime }} minute{{ if (ne .ReadingTime 1) }}s{{ end }}{{end}} {{ end }} - {{ .Date.Format "January 2, 2006" }} + {{ .Date.Format "January 2, 2006" }}{{ if site.Params.features.readingTime }} | {{ .ReadingTime }} minute{{ if (ne .ReadingTime 1) }}s{{ end }}{{end}} {{ i18n "read" }}