mirror of
https://github.com/adityatelange/hugo-PaperMod.git
synced 2023-12-21 10:22:58 +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 }}
|