Update image shortcodes to look in content folder instead of static folder

This commit is contained in:
Joe Hutchinson
2019-07-17 15:46:57 -04:00
parent 85960b6fa3
commit 0d4e85158c
2 changed files with 2 additions and 2 deletions

View File

@@ -1,5 +1,5 @@
<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">
{{- end }}
<source srcset="{{ index .Params "src" | absURL }}">

View File

@@ -1,5 +1,5 @@
<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">
{{- end }}
<source srcset="{{ index .Params "src" | absURL }}">