gallery/layouts/partials/albums/albums.json

16 lines
429 B
JSON

{{- $first := true -}}
{{- range .Pages.ByTitle -}}
{{- if not $first }}, {{ end }}
{{ $first = false -}}
{
"title": "{{ .Title }}",
{{- with .Resources.GetMatch "album.zip" }}
"albumDownload": "{{ .RelPermalink }}",
{{ else -}}
{{ warnf "Could not find album.zip for %s" .RelPermalink -}}
{{ end -}}
"images": [{{ partial "albums/images.json" . }}],
"albums": [{{ partial "albums/albums.json" . }}]
}
{{ end -}}