mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2025-02-13 07:13:29 +00:00
11 lines
No EOL
471 B
Go Template
11 lines
No EOL
471 B
Go Template
{{- $linkObject := "" }}
|
|
{{- /* 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 .refObject }}
|
|
{{- $linkObject = . }}
|
|
{{- else }}
|
|
{{- with .objectRef }}
|
|
{{- $linkObject = partial "_relearn/linkObject.gotmpl" (dict "url" . "page" $.page "searchLocal" false "searchPage" $.searchPage "searchResource" $.searchResource) }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- return $linkObject }} |