mirror of
https://github.com/Wonderfall/hugo-WonderMod.git
synced 2024-12-20 21:14:31 -05:00
10 lines
583 B
HTML
10 lines
583 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 " " }}" rel="noopener noreferrer">{{ $url.Host }}</a>
|
|
</span>
|
|
{{- end }}
|