mirror of
https://github.com/McShelby/hugo-theme-relearn
synced 2025-04-30 19:11:03 +08:00
theme: amend deprecation/unsupport console messages
This commit is contained in:
parent
79b42f95a8
commit
d7c33b8fed
@ -112,7 +112,7 @@ Non-auto run:
|
|||||||
{{- $chroma := "" }}
|
{{- $chroma := "" }}
|
||||||
{{- range findRESubmatch `[ \t]*@import\s+[^$]*?chroma-([^.]*?)\.css` $themecontent }}
|
{{- range findRESubmatch `[ \t]*@import\s+[^$]*?chroma-([^.]*?)\.css` $themecontent }}
|
||||||
{{- $chroma = index . 1 }}
|
{{- $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 }}
|
{{- end }}
|
||||||
{{- range findRESubmatch `[ \t]*@import\s+[^$]*?theme-([^.]*?)\.css` $themecontent }}
|
{{- range findRESubmatch `[ \t]*@import\s+[^$]*?theme-([^.]*?)\.css` $themecontent }}
|
||||||
{{- $subidentifier := index . 1 }}
|
{{- $subidentifier := index . 1 }}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{{- $title := "" }}
|
{{- $title := "" }}
|
||||||
{{- with .page }}
|
{{- with .page }}
|
||||||
{{- if .Params.menuTitle }}
|
{{- 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 }}
|
{{- end }}
|
||||||
{{- $format := $.format | default (partial "get-format.hugo" .) }}
|
{{- $format := $.format | default (partial "get-format.hugo" .) }}
|
||||||
{{- $outputFormat := $.outputFormat | default (partial "output-format.hugo" (dict "page" . "format" $format)) }}
|
{{- $outputFormat := $.outputFormat | default (partial "output-format.hugo" (dict "page" . "format" $format)) }}
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
{{- $page := .page }}
|
{{- $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 }}
|
{{- if and (not $page) .context }}
|
||||||
{{- $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 }}
|
{{- 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 }}
|
{{- 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 "" }}
|
{{- $color := .color | default "" }}
|
||||||
{{- $content := .content }}
|
{{- $content := .content }}
|
||||||
{{- $style := .style | default "default" }}
|
{{- $style := .style | default "default" }}
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
{{- $pattern := .pattern | default "" }}
|
{{- $pattern := .pattern | default "" }}
|
||||||
{{- with $page }}
|
{{- with $page }}
|
||||||
{{- if eq .BundleType "" }}
|
{{- 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 }}
|
{{- end }}
|
||||||
<div class="box attachments cstyle {{ $style }}"{{ if $color }} style="--VARIABLE-BOX-color: {{ $color }};"{{ 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>
|
<div class="box-label">{{ if $icon }}<i class="{{ $icon }}"></i>{{ end }}{{ if and $icon $title }} {{ end }}{{ $title | .RenderString }}</div>
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
{{- $page := .page }}
|
{{- $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 }}
|
{{- if and (not $page) .context }}
|
||||||
{{- $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 }}
|
{{- 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 }}
|
{{- 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
|
{{- partial "shortcodes/openapi.html" (dict
|
||||||
"page" $page
|
"page" $page
|
||||||
"src" .src
|
"src" .src
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
window.relearn.relBaseUri='{{ partial "relBaseUri.hugo" $page | safeJS }}';
|
window.relearn.relBaseUri='{{ partial "relBaseUri.hugo" $page | safeJS }}';
|
||||||
window.relearn.absBaseUri='{{ replaceRE "/*$" "" .Site.BaseURL | safeJS }}';
|
window.relearn.absBaseUri='{{ replaceRE "/*$" "" .Site.BaseURL | safeJS }}';
|
||||||
{{- with .Site.Home.OutputFormats.Get "json" }}
|
{{- 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 }};
|
window.index_json_url={{ "index.json" | relLangURL }};
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- with .Site.Home.OutputFormats.Get "search" }}
|
{{- with .Site.Home.OutputFormats.Get "search" }}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{{- $_hugo_config := `{ "version": 1 }` }}
|
{{- $_hugo_config := `{ "version": 1 }` }}
|
||||||
{{- if (.Get "icon-position") }}
|
{{- 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 }}
|
{{- end }}
|
||||||
{{- partial "shortcodes/button.html" (dict
|
{{- partial "shortcodes/button.html" (dict
|
||||||
"page" .Page
|
"page" .Page
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
{{- $color := (.Get "color") }}
|
{{- $color := (.Get "color") }}
|
||||||
{{- $groupid := ((.Get "groupid") | default (.Get "groupId")) }}
|
{{- $groupid := ((.Get "groupid") | default (.Get "groupId")) }}
|
||||||
{{- if (.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 }}
|
{{- end }}
|
||||||
{{- $icon := (.Get "icon") }}
|
{{- $icon := (.Get "icon") }}
|
||||||
{{- $style := (.Get "style") }}
|
{{- $style := (.Get "style") }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user