Update image shortcodes to look in content folder instead of static folder
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
<picture>
|
<picture>
|
||||||
{{ if (fileExists (printf "%s/%s" "static" (replace (index .Params "src") (path.Ext (index .Params "src")) ".webp"))) -}}
|
{{ if (fileExists (printf "%s/%s" "content" (replace (index .Params "src") (path.Ext (index .Params "src")) ".webp"))) -}}
|
||||||
<source srcset="{{ replace (index .Params "src") (path.Ext (index .Params "src")) ".webp" | absURL }}" type="image/webp">
|
<source srcset="{{ replace (index .Params "src") (path.Ext (index .Params "src")) ".webp" | absURL }}" type="image/webp">
|
||||||
{{- end }}
|
{{- end }}
|
||||||
<source srcset="{{ index .Params "src" | absURL }}">
|
<source srcset="{{ index .Params "src" | absURL }}">
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<picture>
|
<picture>
|
||||||
{{ if (fileExists (printf "%s/%s" "static" (replace (index .Params "src") (path.Ext (index .Params "src")) ".webp"))) -}}
|
{{ if (fileExists (printf "%s/%s" "content" (replace (index .Params "src") (path.Ext (index .Params "src")) ".webp"))) -}}
|
||||||
<source srcset="{{ replace (index .Params "src") (path.Ext (index .Params "src")) ".webp" | absURL }}" type="image/webp">
|
<source srcset="{{ replace (index .Params "src") (path.Ext (index .Params "src")) ".webp" | absURL }}" type="image/webp">
|
||||||
{{- end }}
|
{{- end }}
|
||||||
<source srcset="{{ index .Params "src" | absURL }}">
|
<source srcset="{{ index .Params "src" | absURL }}">
|
||||||
|
|||||||
Reference in New Issue
Block a user