Hi.
⇒ My git
⇒ My hugo version:
$ hugo version
hugo v0.122.0+extended linux/amd64 BuildDate=2024-02-04T14:35:47Z VendorInfo=debian:0.122.0-1
On my index.htm (home page), I retrieve information from yaml files on my data directory, segun language.lang value, as instance debian.yaml file.
My concerned code:
<div class="content-width-80 pure-g">{{ $site := index .Site.Data.promote .Site.Language.Lang }}
{{ range $site }}{{ $os := .name | markdownify }}
<div class="is-white pure-u-1 pure-u-md-1-2 pure-u-lg-1-3" id="section-{{ $os }}">
<h2>{{ $src := printf "%s%s%s" "/svg/" $os ".svg" }}
<svg class="svg-48">{{ partial "utils/svg" (dict "src" $src) }}</svg>
<span aria-hidden="true" class="hidden" hidden>{{ $os | strings.FirstUpper }}</span>
</h2>
{{ range index .tag }}
<h3>{{ .h3}}</h3>
{{ range index .dl }}
<dl>
<dt>{{ .dt }}</dt>
{{ range index .dd }}{{ $path := printf "%s%s%s%s%s" "/sys/" $os "/" .url "/" | relLangURL | urlize }}{{ $opts := dict "path" $path }}
{{ $page := .Site.GetPage $path }}Page: {{ $page }}
<dd><a href="{{ $path }}">{{ .txt }}</a></dd>
{{ end }}
</dl>
{{ end }}
{{ end }}
</div>
{{ end }}
On line 64, I build a $path.
The aim is to obtain information about the page in question, mainly the title,
(this would allow me to avoid having a ‘txt’ key on my yaml file, same value than .Title)
I also tried to build the variable by putting “.md” in place of the final “/”.
I’m trying .GetPage or .Site.GetPage but it’s not working.
Egual, I tried to use ref, refrel.
What I don’t understand?