diff --git a/CHANGELOG.md b/CHANGELOG.md index 8bbfdad7..73967a60 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ All notable changes to this project will be documented in this file. > Snapshot: <> +- :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)) - **Full Changelog:** @Lruihao [`v0.2.16...v0.2.17`](https://github.com/hugo-fixit/FixIt/compare/v0.2.16...v0.2.17) diff --git a/config.toml b/config.toml index 45816e71..8d37abad 100644 --- a/config.toml +++ b/config.toml @@ -81,9 +81,6 @@ # FixIt 0.2.14 | NEW FixIt will, by default, inject a theme meta tag in the HTML head on the home page only. # You can turn it off, but we would really appreciate if you don’t, as this is a good way to watch FixIt's popularity on the rise. disableThemeInject = false - # FixIt 0.2.16 | NEW Auto Bookmark Support - # If true, save the reading progress when closing the page. - autoBookmark = false # FixIt 0.2.0 | NEW App icon config [params.app] @@ -338,6 +335,9 @@ pageStyle = "normal" # FixIt 0.2.14 | NEW Gravatar is force-used as the author's avatar gravatarForce = false + # FixIt 0.2.17 | CHANGED Auto Bookmark Support + # If true, save the reading progress when closing the page. + autoBookmark = false # FixIt 0.2.15 | NEW Repost config [params.page.repost] enable = false diff --git a/docs b/docs index bfdc311f..6bc07571 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit bfdc311fbd0bd627cccd41ccbc32c2a4d7505803 +Subproject commit 6bc07571d1e15affd9c0c5a88a7d23ade3df741e diff --git a/layouts/partials/assets.html b/layouts/partials/assets.html index 995e7548..6d8101e6 100644 --- a/layouts/partials/assets.html +++ b/layouts/partials/assets.html @@ -238,8 +238,10 @@ {{- end -}} {{- /* Auto Bookmark */ -}} -{{- with .Site.Params.autoBookmark -}} - {{- $config = dict "autoBookmark" . | merge $config -}} +{{- if eq .Kind "page" -}} + {{- with $params.autoBookmark -}} + {{- $config = dict "autoBookmark" . | merge $config -}} + {{- end -}} {{- end -}} {{- range $params.library.css -}} diff --git a/layouts/partials/init/detection-deprecated.html b/layouts/partials/init/detection-deprecated.html index 1ee874fc..7b952f40 100644 --- a/layouts/partials/init/detection-deprecated.html +++ b/layouts/partials/init/detection-deprecated.html @@ -7,6 +7,10 @@ {{- with .Site.Params.ibruce.siteTime -}} {{- $warnErrors = $warnErrors | append "The parameter `ibruce.siteTime` is deprecated since v0.2.14, use `footer.siteTime` instead." -}} {{- end -}} +{{- with .Site.Params.autoBookmark -}} + {{- $warnErrors = $warnErrors | append "The parameter `autoBookmark` is deprecated since v0.2.17, use `page.autoBookmark` instead." -}} +{{- end -}} + {{- if len $warnErrors -}} {{- warnf "Deprecated parameter detection until %v\n - %v\n\n" (.Scratch.Get "version") (delimit $warnErrors "\n - ") -}} {{- end -}}