diff --git a/CHANGELOG.md b/CHANGELOG.md index ad67e17a..ea6cf35c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ All notable changes to this project will be documented in this file. > Snapshot: <> +- :sparkles: Feat: add params to close wordcount and readingTime in post ([#209](https://github.com/hugo-fixit/FixIt/issues/209)) - :truck: Feat: migrate parameter `params.autoBookmark` to `params.page.autoBookmark` ([#55](https://github.com/hugo-fixit/FixIt/issues/55)) - :bug: Fix: remove the leading and trailing whitespace of the code string ([#205](https://github.com/hugo-fixit/FixIt/issues/205)) - :bug: Fix: image shortcode/plugin lose the support for svg type files ([#210](https://github.com/hugo-fixit/FixIt/issues/210)) diff --git a/config.toml b/config.toml index 8d37abad..e59868bd 100644 --- a/config.toml +++ b/config.toml @@ -338,6 +338,11 @@ # FixIt 0.2.17 | CHANGED Auto Bookmark Support # If true, save the reading progress when closing the page. autoBookmark = false + # FixIt 0.2.17 | NEW whether to enable wordCount + wordCount = true + # FixIt 0.2.17 | NEW whether to enable readingTime + readingTime = true + # FixIt 0.2.15 | NEW Repost config [params.page.repost] enable = false diff --git a/docs b/docs index 6bc07571..92840395 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 6bc07571d1e15affd9c0c5a88a7d23ade3df741e +Subproject commit 92840395bac437783cf90d9fbcd27022ca8329c2 diff --git a/layouts/posts/single.html b/layouts/posts/single.html index 5a3c0d41..a41a7cf5 100644 --- a/layouts/posts/single.html +++ b/layouts/posts/single.html @@ -67,13 +67,16 @@ {{- printf `` . . | safeHTML -}}   {{- end -}} - - {{- dict "Class" "fa-solid fa-pencil-alt fa-fw" | partial "plugin/icon.html" }} {{ T "wordCount" .WordCount -}} -   - {{- /* NO_SPACING */ -}} - - {{- dict "Class" "fa-regular fa-clock fa-fw" | partial "plugin/icon.html" }} {{ T "readingTime" .ReadingTime -}} -   + {{- if $params.wordCount -}} + + {{- dict "Class" "fa-solid fa-pencil-alt fa-fw" | partial "plugin/icon.html" }} {{ T "wordCount" .WordCount -}} +   + {{- end -}} + {{- if $params.readingTime -}} + + {{- dict "Class" "fa-regular fa-clock fa-fw" | partial "plugin/icon.html" }} {{ T "readingTime" .ReadingTime -}} +   + {{- end -}} {{- /* If the article expires, close the comment or not */ -}} {{- $expirationReminder := $params.expirationReminder | default dict -}}