diff --git a/layouts/partials/resources/imageJSON.html b/layouts/partials/resources/imageJSON.html new file mode 100644 index 0000000..fd29203 --- /dev/null +++ b/layouts/partials/resources/imageJSON.html @@ -0,0 +1,18 @@ +{{- $Page := .Page -}} + +{{ $gallery := site.GetPage .Path }} +{{ with $gallery.Resources.ByType "image" }} + {{ $index := len . }} + {{ $Page.Scratch.Add "img" slice }} + {{ range . }} + {{ $index = sub $index 1 }} + {{ $resize := .Resize "x2000 webp Lanczos q70" }} + {{ $Page.Scratch.Add "img" (dict + "index" (int $index) + "url" (string .RelPermalink) + "imgH" (int .Height) + "imgW" (int .Width)) + }} + {{- end -}} + +{{- end -}}