hugo-theme-wondermod/layouts/partials/post_canonical.html

10 lines
583 B
HTML
Raw Permalink Normal View History

{{ 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" -}}
2022-09-01 03:57:32 +02:00
&nbsp;<a href="{{ trim .Params.canonicalURL " " }}" title="{{ trim .Params.canonicalURL " " }}" rel="noopener noreferrer">{{ $url.Host }}</a>
</span>
{{- end }}