post-cover: fix strange /./ in cover image url

#13
This commit is contained in:
Aditya Telange 2020-10-08 09:21:57 +05:30
parent fae1c47611
commit 82e9b29bf4
No known key found for this signature in database
GPG Key ID: 82E844EF3DA99E77

View File

@ -31,7 +31,7 @@
{{- if (or (fileExists (path.Join "static" .Params.cover.image)) (hasPrefix .Params.cover.image "http://") (hasPrefix .Params.cover.image "https://")) }}
<img src="{{ .Params.cover.image | absURL }}" alt="{{ .Params.cover.alt | plainify }}">
{{- else}}
<img src="{{ .Permalink -}} {{- .Params.cover.image }}" alt="{{ .Params.cover.alt | plainify }}">
<img src="{{ (path.Join .RelPermalink .Params.cover.image ) | absURL }}" alt="{{ .Params.cover.alt | plainify }}">
{{- end}}
<p>{{.Params.cover.caption | markdownify }}</p>
</figure>