🚚 Feat: merge parameter footer.custom to custom file

This commit is contained in:
Cell
2022-12-26 11:38:01 +08:00
parent cb3f77f064
commit 0a67c51495
5 changed files with 9 additions and 10 deletions
+3
View File
@@ -160,6 +160,9 @@
# Footer config
[params.footer]
enable = true
# FixIt 0.2.17 | CHANGED Custom content (HTML format is supported)
# For advanced use, see parameter `params.customFilePath.footer`
custom = ""
# FixIt 0.2.0 | NEW whether to show Hugo and theme info
hugo = true
# FixIt 0.2.0 | NEW whether to show copyright info
+1 -1
Submodule docs updated: de5dc859b2...cb80c07b28
+5
View File
@@ -1 +1,6 @@
{{- /* Custom footer html */ -}}
{{- with .Site.Params.footer.custom -}}
<div class="footer-line custom">
{{- safeHTML . -}}
</div>
{{- end -}}
-6
View File
@@ -1,12 +1,6 @@
{{- if ne .Site.Params.footer.enable false -}}
<footer class="footer">
<div class="footer-container">
{{- /* TODO Custom Content deprecated */ -}}
{{- with .Site.Params.footer.custom -}}
<div class="footer-line custom">
{{- safeHTML . -}}
</div>
{{- end -}}
{{- /* Custom Content */ -}}
{{- partial (.Scratch.Get "customFilePath").footer . -}}
@@ -11,9 +11,6 @@
{{- with .Site.Params.autoBookmark -}}
{{- $warns = $warns | append "The parameter `autoBookmark` is deprecated since v0.2.17, use `page.autoBookmark` instead." -}}
{{- end -}}
{{- with .Site.Params.footer.custom -}}
{{- $warns = $warns | append "The parameter `footer.custom` is deprecated since v0.2.17, use parameter `params.customFilePath.footer` instead." -}}
{{- end -}}
{{- with .Site.Params.footer.siteTime -}}
{{- if gt (len .) 4 -}}
{{- $errors = $errors | append "The parameter `footer.siteTime` has changed to an array since v0.2.17. Please correct the format!" -}}