Use relURL for post-cover

Use relURL instead of statically adding a / in front of the path.  
Otherwise, this would give issues with external URLs. Also assumes user would know that a / is added in front of the path, making it relative to the root.
This commit is contained in:
TheGroundZero 2020-07-24 19:09:46 +02:00 committed by GitHub
parent 6fa58f635e
commit f9ccae8e3f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -24,7 +24,7 @@
{{- end }}
{{ with .Params.Cover }}
<img src="/{{ . }}" class="post-cover" />
<img src="{{ . | relURL }}" class="post-cover" />
{{ end }}
<div class="post-content">