shortcodes: add more deprecation warnings #598

This commit is contained in:
Sören Weber 2023-07-27 16:54:06 +02:00
parent 9555614ac4
commit 72f08f142b
No known key found for this signature in database
GPG key ID: BEC6D55545451B6D
3 changed files with 10 additions and 1 deletions

View file

@ -1,4 +1,7 @@
{{- $_hugo_config := `{ "version": 1 }` }}
{{- if (.Get "icon-position") }}
{{- warnf "%q: DEPRECATED parameter 'icon-position' for shortcode 'button' found, use 'iconposition' instead" .Page.File.Path }}
{{- end }}
{{- partial "shortcodes/button.html" (dict
"page" .Page
"color" (.Get "color")

View file

@ -1,3 +1,6 @@
{{- if (.Get "showfirstheading") }}
{{- warnf "%q: UNSUPPORTED parameter 'showfirstheading' for shortcode 'include' found, use 'hidefirstheading' instead; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration/#420-2022-06-23" .Page.File.Path }}
{{- end }}
{{- partial "shortcodes/include.html" (dict
"page" .Page
"file" (.Get "file" | default (.Get 0))

View file

@ -3,7 +3,10 @@
{{- $major := int (index $version 0) }}
{{- $minor := int (index $version 1) }}
{{- $color := (.Get "color") }}
{{- $groupid := (.Get "groupid") }}
{{- $groupid := ((.Get "groupid") | default (.Get "groupId")) }}
{{- if (.Get "groupId") }}
{{- warnf "%q: DEPRECATED parameter 'groupId' for shortcode 'tabs' found, use 'groupid' instead" .Page.File.Path }}
{{- end }}
{{- $icon := (.Get "icon") }}
{{- $style := (.Get "style") }}
{{- $title := (.Get "title") }}