From 7749ff39fa2708b67d9deed4bb2ea6b5bf555567 Mon Sep 17 00:00:00 2001 From: BBaoVanC Date: Fri, 22 Oct 2021 23:05:51 -0500 Subject: [PATCH] Make word count and reading time enabled by default --- exampleSite/config.toml | 2 +- layouts/partials/post-metadata.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/exampleSite/config.toml b/exampleSite/config.toml index f5aa4a9..8dad257 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -20,7 +20,7 @@ enableGitInfo = true faviconICO = "/favicon.ico" faviconPNG = "/favicon.png" - # show word count and/or reading time + # show word count and/or reading time (enabled by default) wordcount = true readingtime = true diff --git a/layouts/partials/post-metadata.html b/layouts/partials/post-metadata.html index 8659695..fca0ad2 100644 --- a/layouts/partials/post-metadata.html +++ b/layouts/partials/post-metadata.html @@ -29,14 +29,14 @@ {{ end }} - {{ if .Site.Params.wordcount }} + {{ if ne .Site.Params.wordcount false }} {{ partial "icon.html" "type" }} {{ i18n "wordcount" .WordCount }} {{ end }} - {{ if .Site.Params.readingtime }} + {{ if ne .Site.Params.readingtime false }} {{ partial "icon.html" "clock" }} {{ i18n "readingtime" .ReadingTime }}