mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 15:28:57 +00:00
7c67b90acf
Resolve #472 Close EvanNotFound/vercount#10
28 lines
1.2 KiB
HTML
28 lines
1.2 KiB
HTML
{{- /* Deprecated parameter detection */ -}}
|
|
{{- $warns := slice -}}
|
|
{{- $errors := slice -}}
|
|
|
|
{{- with .Site.Params.gitRepo | or .Site.Params.page.edit -}}
|
|
{{- $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 -}}
|
|
|
|
{{- with .Site.Params.ibruce -}}
|
|
{{- $warns = $warns | append "The parameter `params.ibruce` is deprecated since v0.3.9, use `params.busuanzi` instead." -}}
|
|
{{- end -}}
|
|
|
|
{{- if len $warns -}}
|
|
{{- warnf "Deprecated parameter detection until %v\n - %v\n\n" (.Scratch.Get "version") (delimit $warns "\n - ") -}}
|
|
{{- end -}}
|
|
|
|
{{- if len $errors -}}
|
|
{{- errorf "Deprecated parameter detection until %v\n - %v\n\n" (.Scratch.Get "version") (delimit $errors "\n - ") -}}
|
|
{{- end -}}
|