diff --git a/layouts/_default/single.html b/layouts/_default/single.html index d5d7619..8f49742 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -10,9 +10,13 @@

Posted

{{ if isset .Params "featuredimage" }} -
+ + {{ if (fileExists (printf "%s/%s" "static" (replace (.Params.featuredimage) (path.Ext (.Params.featuredimage)) ".webp"))) -}} + + {{- end }} + -
+ {{ end }} {{ .Content }} diff --git a/layouts/shortcodes/image.html b/layouts/shortcodes/image.html new file mode 100644 index 0000000..d7c0c10 --- /dev/null +++ b/layouts/shortcodes/image.html @@ -0,0 +1,5 @@ + + + + {{ index .Params + \ No newline at end of file