mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2025-02-13 15:23:30 +00:00
11 lines
No EOL
397 B
Go Template
11 lines
No EOL
397 B
Go Template
{{- $linkPage := "" }}
|
|
{{- /* because Hugo can not resolve a pageRef if it contains URL query params or
|
|
fragments, we do it ourself if we detect such a case */}}
|
|
{{- with .refPage }}
|
|
{{- $linkPage = . }}
|
|
{{- else }}
|
|
{{- with .pageRef }}
|
|
{{- $linkPage = partial "_relearn/linkPage.gotmpl" (dict "url" . "page" $.page "searchLocal" false) }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- return $linkPage }} |