theme: amend deprecation/unsupport console messages

This commit is contained in:
Sören Weber 2024-04-24 22:42:49 +02:00
parent 79b42f95a8
commit d7c33b8fed
No known key found for this signature in database
GPG key ID: BEC6D55545451B6D
8 changed files with 8 additions and 8 deletions

View file

@ -112,7 +112,7 @@ Non-auto run:
{{- $chroma := "" }}
{{- range findRESubmatch `[ \t]*@import\s+[^$]*?chroma-([^.]*?)\.css` $themecontent }}
{{- $chroma = index . 1 }}
{{- errorf "\"theme-%s.css\": UNSUPPORTED use of @import for chroma stylesheet, instead use '--CODE-theme: %s;'" $identifier $chroma }}
{{- errorf "\"theme-%s.css\": UNSUPPORTED use of @import for chroma stylesheet, instead use '--CODE-theme: %s;'; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration#600" $identifier $chroma }}
{{- end }}
{{- range findRESubmatch `[ \t]*@import\s+[^$]*?theme-([^.]*?)\.css` $themecontent }}
{{- $subidentifier := index . 1 }}

View file

@ -1,7 +1,7 @@
{{- $title := "" }}
{{- with .page }}
{{- if .Params.menuTitle }}
{{- warnf "%q: UNSUPPORTED frontmatter 'menutitle' found, use 'linktitle' instead" $.File.Filename }}
{{- warnf "%q: UNSUPPORTED frontmatter 'menutitle' found, use 'linktitle' instead; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration#600" $.File.Filename }}
{{- end }}
{{- $format := $.format | default (partial "get-format.hugo" .) }}
{{- $outputFormat := $.outputFormat | default (partial "output-format.hugo" (dict "page" . "format" $format)) }}

View file

@ -1,9 +1,9 @@
{{- $page := .page }}
{{- warnf "%q: DEPRECATED shortcode `attachments` found, use `resources` instead; see https://mcshelby.github.io/hugo-theme-relearn/shortcodes/attachments#migration" $page.File.Filename }}
{{- if and (not $page) .context }}
{{- $page = .context }}
{{- warnf "%q: DEPRECATED parameter 'context' for shortcode 'attachments' found, use 'page' instead; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration#5180" $page.File.Filename }}
{{- end }}
{{ warnf "%q: DEPRECATED shortcode `attachments` found, use `resources` instead; see https://mcshelby.github.io/hugo-theme-relearn/shortcodes/attachments#migration" $page.File.Filename }}
{{- $color := .color | default "" }}
{{- $content := .content }}
{{- $style := .style | default "default" }}

View file

@ -33,7 +33,7 @@
{{- $pattern := .pattern | default "" }}
{{- with $page }}
{{- if eq .BundleType "" }}
{{- warnf "%q: UNSUPPORTED usage of 'resources' shortcode found, use a page bundle instead" $page.File.Filename }}
{{- warnf "%q: UNSUPPORTED usage of 'resources' shortcode found, use a page bundle instead; see https://mcshelby.github.io/hugo-theme-relearn/shortcodes/resources" $page.File.Filename }}
{{- end }}
<div class="box attachments cstyle {{ $style }}"{{ if $color }} style="--VARIABLE-BOX-color: {{ $color }};"{{ end }}>
<div class="box-label">{{ if $icon }}<i class="{{ $icon }}"></i>{{ end }}{{ if and $icon $title }} {{ end }}{{ $title | .RenderString }}</div>

View file

@ -1,9 +1,9 @@
{{- $page := .page }}
{{- warnf "%q: DEPRECATED shortcode `swagger` found, use `openapi` instead; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration#5130" $page.File.Filename }}
{{- if and (not $page) .context }}
{{- $page = .context }}
{{- warnf "%q: DEPRECATED parameter 'context' for shortcode 'swagger' found, use 'page' instead; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration#5180" $page.File.Filename }}
{{- end }}
{{ warnf "%q: DEPRECATED shortcode `swagger` found, use `openapi` instead; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration#5130" $page.File.Filename }}
{{- partial "shortcodes/openapi.html" (dict
"page" $page
"src" .src

View file

@ -31,7 +31,7 @@
window.relearn.relBaseUri='{{ partial "relBaseUri.hugo" $page | safeJS }}';
window.relearn.absBaseUri='{{ replaceRE "/*$" "" .Site.BaseURL | safeJS }}';
{{- with .Site.Home.OutputFormats.Get "json" }}
{{- warnf "%q: DEPRECATED usage of 'json' output format found, use 'search' instead; see https://mcshelby.github.io/hugo-theme-relearn/basics/customization#activate-search" $page.File.Filename }}
{{- warnf "DEPRECATED usage of 'json' output format found, use 'search' instead; see https://mcshelby.github.io/hugo-theme-relearn/basics/customization#activate-search" }}
window.index_json_url={{ "index.json" | relLangURL }};
{{- end }}
{{- with .Site.Home.OutputFormats.Get "search" }}

View file

@ -1,6 +1,6 @@
{{- $_hugo_config := `{ "version": 1 }` }}
{{- if (.Get "icon-position") }}
{{- warnf "%q: DEPRECATED parameter 'icon-position' for shortcode 'button' found, use 'iconposition' instead" .Page.File.Filename }}
{{- warnf "%q: DEPRECATED parameter 'icon-position' for shortcode 'button' found, use 'iconposition' instead; see https://mcshelby.github.io/hugo-theme-relearn/shortcodes/button#parameter" .Page.File.Filename }}
{{- end }}
{{- partial "shortcodes/button.html" (dict
"page" .Page

View file

@ -2,7 +2,7 @@
{{- $color := (.Get "color") }}
{{- $groupid := ((.Get "groupid") | default (.Get "groupId")) }}
{{- if (.Get "groupId") }}
{{- warnf "%q: DEPRECATED parameter 'groupId' for shortcode 'tabs' found, use 'groupid' instead" .Page.File.Filename }}
{{- warnf "%q: DEPRECATED parameter 'groupId' for shortcode 'tabs' found, use 'groupid' instead; see https://mcshelby.github.io/hugo-theme-relearn/shortcodes/tabs#parameter" .Page.File.Filename }}
{{- end }}
{{- $icon := (.Get "icon") }}
{{- $style := (.Get "style") }}