Feat: add params to close wordcount and readingTime in post (#209)

This commit is contained in:
Cell
2022-10-11 17:47:25 +08:00
parent 49866cbc49
commit f6f905517c
4 changed files with 17 additions and 8 deletions
+1
View File
@@ -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))
+5
View File
@@ -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
+1 -1
Submodule docs updated: 6bc07571d1...92840395ba
+10 -7
View File
@@ -67,13 +67,16 @@
{{- printf `<time datetime="%v">%v</time>` . . | safeHTML -}}
</span>&nbsp;
{{- end -}}
<span>
{{- dict "Class" "fa-solid fa-pencil-alt fa-fw" | partial "plugin/icon.html" }} {{ T "wordCount" .WordCount -}}
</span>&nbsp;
{{- /* NO_SPACING */ -}}
<span>
{{- dict "Class" "fa-regular fa-clock fa-fw" | partial "plugin/icon.html" }} {{ T "readingTime" .ReadingTime -}}
</span>&nbsp;
{{- if $params.wordCount -}}
<span>
{{- dict "Class" "fa-solid fa-pencil-alt fa-fw" | partial "plugin/icon.html" }} {{ T "wordCount" .WordCount -}}
</span>&nbsp;
{{- end -}}
{{- if $params.readingTime -}}
<span>
{{- dict "Class" "fa-regular fa-clock fa-fw" | partial "plugin/icon.html" }} {{ T "readingTime" .ReadingTime -}}
</span>&nbsp;
{{- end -}}
{{- /* If the article expires, close the comment or not */ -}}
{{- $expirationReminder := $params.expirationReminder | default dict -}}