I have issues with contexts. Probably.
This always works:
<link rel="next" href="{{with .PrevInSection}}{{.relURL}}
But this
{{if not (default false .Params.NoHierarchy)}}
<link rel="next"
href="{{with .PrevInSection}}{{.relURL}}
{{ else }}
{{ with .Params.Next }}
{{(site.GetPage .).RelPermalink}}
{{ end }}{{ end }}">
<link rel="prev"
href="{{ with .NextInSection }}{{ .relPermalink }}{{ else }}{{ with .Params.Prev }}
{{(site.GetPage .).RelPermalink}}
{{ end }}
{{ end }}">
{{end}}
Even though it’s based on the same code.
Hugo indicate
ad" .>: error calling partial:
"~~~/layouts/partials/docs/inject/head.html:12:48":
execute of template failed:
template: partials/docs/inject/head.html:12:48:
executing "partials/docs/inject/head.html" at <.relPermalink>:
can't evaluate field relPermalink in type page.Page
But I don’t understand this. The logic should be simple: if there is no .Params.Prev/Next, use sorting by weight.