From 72f08f142b4d1030c6fbb5d400469a8ff90f36d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Weber?= Date: Thu, 27 Jul 2023 16:54:06 +0200 Subject: [PATCH] shortcodes: add more deprecation warnings #598 --- layouts/shortcodes/button.html | 3 +++ layouts/shortcodes/include.html | 3 +++ layouts/shortcodes/tabs.html | 5 ++++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/layouts/shortcodes/button.html b/layouts/shortcodes/button.html index 70500aa65a..01e539f423 100644 --- a/layouts/shortcodes/button.html +++ b/layouts/shortcodes/button.html @@ -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") diff --git a/layouts/shortcodes/include.html b/layouts/shortcodes/include.html index 9782b54346..40ec01d72f 100644 --- a/layouts/shortcodes/include.html +++ b/layouts/shortcodes/include.html @@ -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)) diff --git a/layouts/shortcodes/tabs.html b/layouts/shortcodes/tabs.html index 5a64f099df..b721cdac6b 100644 --- a/layouts/shortcodes/tabs.html +++ b/layouts/shortcodes/tabs.html @@ -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") }}