Allow single page and list layouts to make use of a full URL for the cover
This commit is contained in:
parent
58fbfec07b
commit
7e813c3565
@ -23,8 +23,13 @@
|
||||
{{ end }}
|
||||
|
||||
{{ with .Params.Cover }}
|
||||
{{ $imgurl := urls.Parse . }}
|
||||
{{ if $imgurl.Scheme }}
|
||||
<img src="{{ printf "%s" . | safeURL }}" class="post-cover" />
|
||||
{{ else }}
|
||||
<img src="{{ printf "img/%s" . | absURL }}" class="post-cover" />
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
<div class="post-content">
|
||||
{{ with .Description }}
|
||||
|
@ -17,8 +17,13 @@
|
||||
{{ end }}
|
||||
|
||||
{{ with .Params.Cover }}
|
||||
{{ $imgurl := urls.Parse . }}
|
||||
{{ if $imgurl.Scheme }}
|
||||
<img src="{{ printf "%s" . | safeURL }}" class="post-cover" />
|
||||
{{ else }}
|
||||
<img src="{{ printf "img/%s" . | absURL }}" class="post-cover" />
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
<div class="post-content">
|
||||
{{ .Content }}
|
||||
|
Loading…
x
Reference in New Issue
Block a user