Hi,
I upgraded from hugo 0.40.0 to v0.78.2 linux/amd64 BuildDate: 2020-11-19T20:56:40Z
with the last version of hugo-theme-learn
Since my upgrade I am facing an issue with relref shortcodes:
Start building sites …
WARN 2020/12/05 08:26:46 Markup type mmark is deprecated and will be removed in a future release. See https://gohugo.io//content-management/formats/#list-of-content-formats
Total in 2362 ms
Error: Error building site: "content/sql-reference-guide/errorhandling.md:160:76": failed to render shortcode "relref": failed to process shortcode: "themes/hugo-theme-learn-master/layouts/shortcodes/relref.html:9:15": execute of template failed: template: shortcodes/relref.html:9:15: executing "shortcodes/relref.html" at <.Site.GetPage>: error calling GetPage: page reference "/sqlline.md" is ambiguous
The .md content/sql-reference-guide/errorhandling.md on line 160 has the following data:
To query the error stream, enter something like the following in [sqlline]({{< relref "sqlline.md" >}}) :
And the shortcode template shortcodes/relref.html has the following content:
{{- if in (.Get 0) "/_index.md" -}}
{{- $paths := (split (.Get 0) "_index.md") -}}
{{- $pagepath := index $paths 0 -}}
{{- $anchor := index $paths 1 -}}
{{- with .Site.GetPage "section" (trim $pagepath "/") -}}
{{- ( printf "%s%s" $pagepath $anchor ) | relLangURL -}}
{{- end -}}
{{- else -}}
{{- with .Site.GetPage "section" (.Get 0) }}
{{- .RelPermalink -}}
{{- else -}}
{{- .Get 0 | relref .Page -}}
{{- end -}}
{{- end -}}
where {{- with .Site.GetPage "section" (.Get 0) }}
is the line number 9, which seems to be culprit of the error.
Could someone help me to fix this? I am a bit lost.
Many thanks!