Fix site-wide image resources
This commit is contained in:
parent
666b92fd55
commit
48aa03bf10
1 changed files with 5 additions and 0 deletions
|
@ -5,6 +5,11 @@
|
||||||
{{ $path := path.Join .Page.File.Dir .Destination }}
|
{{ $path := path.Join .Page.File.Dir .Destination }}
|
||||||
{{- $img = resources.Get $path -}}
|
{{- $img = resources.Get $path -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- if and (not $img) .Page.File -}}
|
||||||
|
{{- $img = resources.Get .Destination -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
{{- with $img -}}
|
{{- with $img -}}
|
||||||
|
|
||||||
<figure>
|
<figure>
|
||||||
|
|
Loading…
Add table
Reference in a new issue