mirror of
https://github.com/Wonderfall/hugo-WonderMod.git
synced 2024-12-23 01:21:04 +01:00
575cc0ca8c
- The site function provides global access to the same data as the .Site page method. - Current context (`.`) is never considered.
10 lines
599 B
HTML
10 lines
599 B
HTML
{{ if and (.Params.canonicalURL) (.Params.ShowCanonicalLink ) -}}
|
|
{{ $url := urls.Parse .Params.canonicalURL }}
|
|
|
|
{{- if or .Params.author site.Params.author (.Param "ShowReadingTime") (not .Date.IsZero) .IsTranslated (or .Params.editPost.URL site.Params.editPost.URL) }} | {{- end -}}
|
|
<span>
|
|
{{- (site.Params.CanonicalLinkText | default .Params.CanonicalLinkText) | default "Originally published at" -}}
|
|
<a href="{{ trim .Params.canonicalURL " " }}" title="{{ trim .Params.canonicalURL " " }}" target="_blank" rel="noopener noreferrer">{{ $url.Host }}</a>
|
|
</span>
|
|
{{- end }}
|