Skip to content

Commit

Permalink
🚚 Feat: the parameter params.customFilePath and `params.footer.cust…
Browse files Browse the repository at this point in the history
…om` is deprecated since v0.3.7, use `layouts/partials/custom.html` instead
  • Loading branch information
Lruihao committed May 9, 2024
1 parent eb0acca commit 71e855a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
2 changes: 2 additions & 0 deletions hugo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,7 @@ enableEmoji = true
# Footer config
[params.footer]
enable = true
# TODO remove in the future
# FixIt 0.2.17 | CHANGED Custom content (HTML format is supported)
# For advanced use, see parameter `params.customFilePath.footer`
custom = ""
Expand Down Expand Up @@ -776,6 +777,7 @@ enableEmoji = true
# "corner-indicator", "fill-left", "flash", "flat-top", "loading-bar", "mac-osx", "material", "minimal"]
theme = "minimal"

# TODO remove in the future
# FixIt 0.2.17 | NEW Define custom file paths
# Create your custom files in site directory `layouts/partials/custom` and uncomment needed files below
[params.customFilePath]
Expand Down
8 changes: 8 additions & 0 deletions layouts/partials/init/detection-deprecated.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@
{{- $warns = $warns | append "The parameter `params.gitRepo` and `params.page.edit` is deprecated since v0.3.0, use `params.gitInfo` instead." -}}
{{- end -}}

{{- with .Site.Params.customFilePath -}}
{{- $warns = $warns | append "The parameter `params.customFilePath` is deprecated since v0.3.7, use `layouts/partials/custom.html` instead." -}}
{{- end -}}

{{- with .Site.Params.footer.custom -}}
{{- $warns = $warns | append "The parameter `params.footer.custom` is deprecated since v0.3.7, use `layouts/partials/custom.html` instead." -}}
{{- end -}}

{{- if len $warns -}}
{{- warnf "Deprecated parameter detection until %v\n - %v\n\n" (.Scratch.Get "version") (delimit $warns "\n - ") -}}
{{- end -}}
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/init/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- .Scratch.Set "version" "v0.3.6" -}}
{{- .Scratch.Set "version" "v0.3.7-RC" -}}
{{- .Scratch.Set "this" dict -}}

{{- partial "init/detection-env.html" . -}}
Expand Down

0 comments on commit 71e855a

Please sign in to comment.