theme: write full file path on warnings #699

This commit is contained in:
Sören Weber 2023-10-28 00:36:30 +02:00
parent 2245d8050a
commit 8b0214e9a5
No known key found for this signature in database
GPG key ID: BEC6D55545451B6D
28 changed files with 35 additions and 35 deletions

View file

@ -1,7 +1,7 @@
{{- $page := .page }} {{- $page := .page }}
{{- if and (not $page) .context }} {{- if and (not $page) .context }}
{{- $page = .context }} {{- $page = .context }}
{{- warnf "%q: DEPRECATED parameter 'context' for shortcode 'piratify' found, use 'page' instead; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration/#5180" $page.File.Path }} {{- warnf "%q: DEPRECATED parameter 'context' for shortcode 'piratify' found, use 'page' instead; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration/#5180" $page.File.Filename }}
{{- end }} {{- end }}
{{- $content := .content }} {{- $content := .content }}
{{- $pagefield := cond (ne $content nil) nil (.pagefield | default "Content") }} {{- $pagefield := cond (ne $content nil) nil (.pagefield | default "Content") }}

View file

@ -1,7 +1,7 @@
{{- $page := .page }} {{- $page := .page }}
{{- $content := .content }} {{- $content := .content }}
{{- with $page }} {{- with $page }}
{{- warnf "%q: DEPRECATED usage of old 'chapter' archetype found, remove 'chapter=true' and add 'archetype=\"chapter\"' to your frontmatter and remove the leading h3 and h1 headings; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration/#500" $page.File.Path }} {{- warnf "%q: DEPRECATED usage of old 'chapter' archetype found, remove 'chapter=true' and add 'archetype=\"chapter\"' to your frontmatter and remove the leading h3 and h1 headings; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration/#500" $page.File.Filename }}
<article class="chapter deprecated"> <article class="chapter deprecated">
<header class="headline"> <header class="headline">
{{- partial "content-header.html" . }} {{- partial "content-header.html" . }}

View file

@ -1,7 +1,7 @@
{{- $page := .page }} {{- $page := .page }}
{{- $content := .content }} {{- $content := .content }}
{{- with $page }} {{- with $page }}
{{- warnf "%q: DEPRECATED usage of old 'home' archetype found, add 'archetype=\"home\"' to your frontmatter and remove the leading h1 heading; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration/#500" $page.File.Path }} {{- warnf "%q: DEPRECATED usage of old 'home' archetype found, add 'archetype=\"home\"' to your frontmatter and remove the leading h1 heading; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration/#500" $page.File.Filename }}
<article class="home deprecated"> <article class="home deprecated">
<header class="headline"> <header class="headline">
{{- partial "content-header.html" . }} {{- partial "content-header.html" . }}

View file

@ -5,7 +5,7 @@
{{- $authorName = . }} {{- $authorName = . }}
{{- end }} {{- end }}
{{- else }} {{- else }}
{{- warnf "%q: DEPRECATED usage of 'params.author' config parameter found, replace it with `params.author.name` in your config.toml; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration/#5230" .File.Path }} {{- warnf "%q: DEPRECATED usage of 'params.author' config parameter found, replace it with `params.author.name` in your config.toml; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration/#5230" .File.Filename }}
{{- $authorName = .Site.Params.author }} {{- $authorName = .Site.Params.author }}
{{- end }} {{- end }}
{{- else }} {{- else }}

View file

@ -20,7 +20,7 @@
<div id="R-homelinks" class="default-animation{{ if not .Site.Params.disableLandingPageButton }} homelinks{{ end }}"> <div id="R-homelinks" class="default-animation{{ if not .Site.Params.disableLandingPageButton }} homelinks{{ end }}">
{{- if not .Site.Params.disableLandingPageButton }} {{- if not .Site.Params.disableLandingPageButton }}
{{- if (ne .Site.Params.landingPageURL nil) }} {{- if (ne .Site.Params.landingPageURL nil) }}
{{- warnf "%q: UNSUPPORTED usage of 'landingPageURL' config parameter found, remove it and optionally overwrite the `logo.html` partial to provide a link if it should not point to the project's home page; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration/#420" .File.Path }} {{- warnf "%q: UNSUPPORTED usage of 'landingPageURL' config parameter found, remove it and optionally overwrite the `logo.html` partial to provide a link if it should not point to the project's home page; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration/#420" .File.Filename }}
{{- end }} {{- end }}
<ul> <ul>
<li><a class="padding" href="{{ partial "relLangPrettyUglyURL.hugo" (dict "to" .Site.Home) }}">{{ .Site.Params.landingPageName | default `<i class="fas fa-home"></i> Home` | safeHTML }}</a></li> <li><a class="padding" href="{{ partial "relLangPrettyUglyURL.hugo" (dict "to" .Site.Home) }}">{{ .Site.Params.landingPageName | default `<i class="fas fa-home"></i> Home` | safeHTML }}</a></li>

View file

@ -28,7 +28,7 @@
{{- else if eq $by "default" }} {{- else if eq $by "default" }}
{{- $pages = $page.Pages }} {{- $pages = $page.Pages }}
{{- else }} {{- else }}
{{- warnf "%q: Unknown pages sort order '%s'" $page.File.Path }} {{- warnf "%q: Unknown pages sort order '%s'" $page.File.Filename }}
{{- $pages = $page.Pages }} {{- $pages = $page.Pages }}
{{- end }} {{- end }}

View file

@ -4,7 +4,7 @@
{{- $page := .page }} {{- $page := .page }}
{{- 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.Path }} {{- 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 }}
{{- $color := .color | default "" }} {{- $color := .color | default "" }}
{{- $content := .content }} {{- $content := .content }}
@ -44,9 +44,9 @@
{{- with $page }} {{- with $page }}
{{- if ne .BundleType "leaf" }} {{- if ne .BundleType "leaf" }}
{{- if or (and (eq $major 0) (ge $minor 112)) (gt $major 0) }} {{- if or (and (eq $major 0) (ge $minor 112)) (gt $major 0) }}
{{- warnf "%q: UNSUPPORTED usage of 'attachments' shortcode found while using Hugo >= 0.112.0, use a leaf bundle instead; see https://mcshelby.github.io/hugo-theme-relearn/shortcodes/attachments/index.html#single-language" $page.File.Path }} {{- warnf "%q: UNSUPPORTED usage of 'attachments' shortcode found while using Hugo >= 0.112.0, use a leaf bundle instead; see https://mcshelby.github.io/hugo-theme-relearn/shortcodes/attachments/index.html#single-language" $page.File.Filename }}
{{- else }} {{- else }}
{{- warnf "%q: DEPRECATED usage of 'attachments' shortcode found which will not be compatible while using Hugo >= 0.112.0, use a leaf bundle instead; see https://mcshelby.github.io/hugo-theme-relearn/shortcodes/attachments/index.html#single-language" $page.File.Path }} {{- warnf "%q: DEPRECATED usage of 'attachments' shortcode found which will not be compatible while using Hugo >= 0.112.0, use a leaf bundle instead; see https://mcshelby.github.io/hugo-theme-relearn/shortcodes/attachments/index.html#single-language" $page.File.Filename }}
{{- end }} {{- end }}
{{- 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 }}>

View file

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

View file

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

View file

@ -1,7 +1,7 @@
{{- $page := .page }} {{- $page := .page }}
{{- if and (not $page) .context }} {{- if and (not $page) .context }}
{{- $page = .context }} {{- $page = .context }}
{{- warnf "%q: DEPRECATED parameter 'context' for shortcode 'children' found, use 'page' instead; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration/#5180" $page.File.Path }} {{- warnf "%q: DEPRECATED parameter 'context' for shortcode 'children' found, use 'page' instead; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration/#5180" $page.File.Filename }}
{{- end }} {{- end }}
{{- $showhidden := .showhidden | default false }} {{- $showhidden := .showhidden | default false }}
{{- if eq (printf "%T" $showhidden) "string" }} {{- if eq (printf "%T" $showhidden) "string" }}

View file

@ -1,7 +1,7 @@
{{- $page := .page }} {{- $page := .page }}
{{- if and (not $page) .context }} {{- if and (not $page) .context }}
{{- $page = .context }} {{- $page = .context }}
{{- warnf "%q: DEPRECATED parameter 'context' for shortcode 'expand' found, use 'page' instead; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration/#5180" $page.File.Path }} {{- warnf "%q: DEPRECATED parameter 'context' for shortcode 'expand' found, use 'page' instead; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration/#5180" $page.File.Filename }}
{{- end }} {{- end }}
{{- $content := .content }} {{- $content := .content }}
{{- $title := .title | default (T "Expand-title") }} {{- $title := .title | default (T "Expand-title") }}

View file

@ -1,7 +1,7 @@
{{- $page := .page }} {{- $page := .page }}
{{- if and (not $page) .context }} {{- if and (not $page) .context }}
{{- $page = .context }} {{- $page = .context }}
{{- warnf "%q: DEPRECATED parameter 'context' for shortcode 'highlight' found, use 'page' instead; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration/#5180" $page.File.Path }} {{- warnf "%q: DEPRECATED parameter 'context' for shortcode 'highlight' found, use 'page' instead; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration/#5180" $page.File.Filename }}
{{- end }} {{- end }}
{{- $attributes := dict }} {{- $attributes := dict }}
{{- $otherAttributes := dict }} {{- $otherAttributes := dict }}

View file

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

View file

@ -1,7 +1,7 @@
{{- $page := .page }} {{- $page := .page }}
{{- if and (not $page) .context }} {{- if and (not $page) .context }}
{{- $page = .context }} {{- $page = .context }}
{{- warnf "%q: DEPRECATED parameter 'context' for shortcode 'image' found, use 'page' instead; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration/#5180" $page.File.Path }} {{- warnf "%q: DEPRECATED parameter 'context' for shortcode 'image' found, use 'page' instead; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration/#5180" $page.File.Filename }}
{{- end }} {{- end }}
{{- $url := .url }} {{- $url := .url }}
{{- $title := .title }} {{- $title := .title }}
@ -44,7 +44,7 @@
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- if $dest_url.Query.Has "featherlight" }} {{- if $dest_url.Query.Has "featherlight" }}
{{- warnf "%q: DEPRECATED usage of 'featherlight' image CSS class found, use 'lightbox' instead; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration/#5110" $page.File.Path }} {{- warnf "%q: DEPRECATED usage of 'featherlight' image CSS class found, use 'lightbox' instead; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration/#5110" $page.File.Filename }}
{{- $effects = merge $effects (dict "lightbox" (ne ($dest_url.Query.Get "featherlight") "false")) }} {{- $effects = merge $effects (dict "lightbox" (ne ($dest_url.Query.Get "featherlight") "false")) }}
{{- end }} {{- end }}
{{- range $k, $v := $effects }} {{- range $k, $v := $effects }}

View file

@ -1,7 +1,7 @@
{{- $page := .page }} {{- $page := .page }}
{{- if and (not $page) .context }} {{- if and (not $page) .context }}
{{- $page = .context }} {{- $page = .context }}
{{- warnf "%q: DEPRECATED parameter 'context' for shortcode 'include' found, use 'page' instead; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration/#5180" $page.File.Path }} {{- warnf "%q: DEPRECATED parameter 'context' for shortcode 'include' found, use 'page' instead; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration/#5180" $page.File.Filename }}
{{- end }} {{- end }}
{{- $file := .file }} {{- $file := .file }}
{{- $hideFirstHeading := .hidefirstheading | default false }} {{- $hideFirstHeading := .hidefirstheading | default false }}

View file

@ -1,11 +1,11 @@
{{- $page := .page }} {{- $page := .page }}
{{- if and (not $page) .context }} {{- if and (not $page) .context }}
{{- $page = .context }} {{- $page = .context }}
{{- warnf "%q: DEPRECATED parameter 'context' for shortcode 'link' found, use 'page' instead; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration/#5180" $page.File.Path }} {{- warnf "%q: DEPRECATED parameter 'context' for shortcode 'link' found, use 'page' instead; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration/#5180" $page.File.Filename }}
{{- end }} {{- end }}
{{- $url := .url }} {{- $url := .url }}
{{- if strings.HasPrefix $url "HAHAHUGOSHORTCODE" }} {{- if strings.HasPrefix $url "HAHAHUGOSHORTCODE" }}
{{- warnf "%q: WARNING you must call the ref / relref shortcode with '%% %%' instead of '< >' to work correctly for the anchor target attribute" $page.File.Path }} {{- warnf "%q: WARNING you must call the ref / relref shortcode with '%% %%' instead of '< >' to work correctly for the anchor target attribute" $page.File.Filename }}
{{- end }} {{- end }}
{{- $title := .title | default "" }} {{- $title := .title | default "" }}
{{- $title = trim $title " " }} {{- $title = trim $title " " }}
@ -48,7 +48,7 @@
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- if not $found }} {{- if not $found }}
{{- warnf "%q: no page was found for link '%s'" $page.File.Path $url.Path }} {{- warnf "%q: no page was found for link '%s'" $page.File.Filename $url.Path }}
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- end }} {{- end }}

View file

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

View file

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

View file

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

View file

@ -1,7 +1,7 @@
{{- $page := .page }} {{- $page := .page }}
{{- if and (not $page) .context }} {{- if and (not $page) .context }}
{{- $page = .context }} {{- $page = .context }}
{{- warnf "%q: DEPRECATED parameter 'context' for shortcode 'openapi' found, use 'page' instead; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration/#5180" $page.File.Path }} {{- warnf "%q: DEPRECATED parameter 'context' for shortcode 'openapi' found, use 'page' instead; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration/#5180" $page.File.Filename }}
{{- end }} {{- end }}
{{- $src := .src }} {{- $src := .src }}
{{- $id := cond (or (eq .id nil) (eq .id "")) (partial "make-random-md5.hugo" $page) .id }} {{- $id := cond (or (eq .id nil) (eq .id "")) (partial "make-random-md5.hugo" $page) .id }}

View file

@ -1,7 +1,7 @@
{{- $page := .page }} {{- $page := .page }}
{{- if and (not $page) .context }} {{- if and (not $page) .context }}
{{- $page = .context }} {{- $page = .context }}
{{- warnf "%q: DEPRECATED parameter 'context' for shortcode 'siteparam' found, use 'page' instead; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration/#5180" $page.File.Path }} {{- warnf "%q: DEPRECATED parameter 'context' for shortcode 'siteparam' found, use 'page' instead; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration/#5180" $page.File.Filename }}
{{- end }} {{- end }}
{{- $paramNames := split .name "." }} {{- $paramNames := split .name "." }}
{{- with $page }} {{- with $page }}

View file

@ -1,8 +1,8 @@
{{ warnf "%q: DEPRECATED shortcode `swagger`found, use `openapi` instead; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration/#5130" .context.File.Path }} {{ warnf "%q: DEPRECATED shortcode `swagger`found, use `openapi` instead; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration/#5130" .context.File.Filename }}
{{- $page := .page }} {{- $page := .page }}
{{- 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.Path }} {{- 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 }}
{{- partial "shortcodes/openapi.html" (dict {{- partial "shortcodes/openapi.html" (dict
"page" $page "page" $page

View file

@ -1,7 +1,7 @@
{{- $page := .page }} {{- $page := .page }}
{{- if and (not $page) .context }} {{- if and (not $page) .context }}
{{- $page = .context }} {{- $page = .context }}
{{- warnf "%q: DEPRECATED parameter 'context' for shortcode 'tab' found, use 'page' instead; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration/#5180" $page.File.Path }} {{- warnf "%q: DEPRECATED parameter 'context' for shortcode 'tab' found, use 'page' instead; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration/#5180" $page.File.Filename }}
{{- end }} {{- end }}
{{- $tabs := (slice | append (dict {{- $tabs := (slice | append (dict
"color" .color "color" .color

View file

@ -1,7 +1,7 @@
{{- $page := .page }} {{- $page := .page }}
{{- if and (not $page) .context }} {{- if and (not $page) .context }}
{{- $page = .context }} {{- $page = .context }}
{{- warnf "%q: DEPRECATED parameter 'context' for shortcode 'tabs' found, use 'page' instead; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration/#5180" $page.File.Path }} {{- warnf "%q: DEPRECATED parameter 'context' for shortcode 'tabs' found, use 'page' instead; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration/#5180" $page.File.Filename }}
{{- end }} {{- end }}
{{- $groupid := .groupid | default (partial "make-random-md5.hugo" $page) | plainify | anchorize }} {{- $groupid := .groupid | default (partial "make-random-md5.hugo" $page) | plainify | anchorize }}
{{- $color := .color }} {{- $color := .color }}
@ -11,7 +11,7 @@
{{- $tabs := slice }} {{- $tabs := slice }}
{{- range $tab := (.content | default slice) }} {{- range $tab := (.content | default slice) }}
{{- if and (not $tab.title) $tab.name }} {{- if and (not $tab.title) $tab.name }}
{{- warnf "%q: DEPRECATED parameter 'name' for shortcode 'tab' found, use 'title' instead; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration/#5160" $page.File.Path }} {{- warnf "%q: DEPRECATED parameter 'name' for shortcode 'tab' found, use 'title' instead; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration/#5160" $page.File.Filename }}
{{- $tab = merge $tab (dict "title" .name) }} {{- $tab = merge $tab (dict "title" .name) }}
{{- end }} {{- end }}
{{- with $tab }} {{- with $tab }}

View file

@ -34,7 +34,7 @@
{{ "// hack to let hugo tell us how to get to the root when using relativeURLs, it needs to be called *url= for it to do its magic:" | safeJS }} {{ "// hack to let hugo tell us how to get to the root when using relativeURLs, it needs to be called *url= for it to do its magic:" | safeJS }}
{{ "// https://github.com/gohugoio/hugo/blob/145b3fcce35fbac25c7033c91c1b7ae6d1179da8/transform/urlreplacers/absurlreplacer.go#L72" | safeJS }} {{ "// https://github.com/gohugoio/hugo/blob/145b3fcce35fbac25c7033c91c1b7ae6d1179da8/transform/urlreplacers/absurlreplacer.go#L72" | 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/configuration/#activate-search" $page.File.Path }} {{- warnf "%q: DEPRECATED usage of 'JSON' output format found, use 'SEARCH' instead; see https://mcshelby.github.io/hugo-theme-relearn/basics/configuration/#activate-search" $page.File.Filename }}
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" }}

View file

@ -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.Path }} {{- warnf "%q: DEPRECATED parameter 'icon-position' for shortcode 'button' found, use 'iconposition' instead" .Page.File.Filename }}
{{- end }} {{- end }}
{{- partial "shortcodes/button.html" (dict {{- partial "shortcodes/button.html" (dict
"page" .Page "page" .Page

View file

@ -1,5 +1,5 @@
{{- if (.Get "showfirstheading") }} {{- 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" .Page.File.Path }} {{- warnf "%q: UNSUPPORTED parameter 'showfirstheading' for shortcode 'include' found, use 'hidefirstheading' instead; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration/#420" .Page.File.Filename }}
{{- end }} {{- end }}
{{- partial "shortcodes/include.html" (dict {{- partial "shortcodes/include.html" (dict
"page" .Page "page" .Page

View file

@ -5,7 +5,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.Path }} {{- warnf "%q: DEPRECATED parameter 'groupId' for shortcode 'tabs' found, use 'groupid' instead" .Page.File.Filename }}
{{- end }} {{- end }}
{{- $icon := (.Get "icon") }} {{- $icon := (.Get "icon") }}
{{- $style := (.Get "style") }} {{- $style := (.Get "style") }}