initial: support lqip and responsive image rendering/resizing

This commit is contained in:
kdevo
2021-09-18 11:20:39 +02:00
commit 3cfc4e6945
21 changed files with 380 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
{{/* Input: Input: dict {"responsive": [RESOURCE, ...]}. Output: srcset string */}}
{{ $images := .responsive }}
{{ $srcset := slice }}
{{ range $images }}
{{ $srcset = append (printf "%s %dw" .Permalink .Width) $srcset }}
{{ end }}
{{ return (delimit $srcset ",\n") }}