{{/* section label: Downloads about: Files to download, each with its type and size. fields: - { name: heading, type: text, default: Downloads } - { name: intro, type: markdown } - name: items type: list label: Files fields: - { name: title, type: text, required: true } - { name: file, type: link, required: true, help: "A file in static/, such as /files/menu.pdf." } - { name: description, type: text } - { name: updated, type: text, help: "When it last changed, as you'd write it: March 2026." } - { name: from, type: data, label: Files from, help: A file in data/ that holds the list. Leave empty to use the files above. } */}} {{ $items := .Data.items }}{{ with .Data.from }}{{ $items = data . }}{{ end }} {{ with .Data.heading }}{{ . }}{{ end }} {{ with .Data.intro }}{{ markdownify . }}{{ end }} {{ range $items }}{{ $parts := split "." .file }}{{ $ext := upper (index $parts (add (len $parts) -1)) }}{{ $size := fileSize .file }} {{ $ext }} {{ .title }} {{ $ext }}{{ with $size }} · {{ . }}{{ end }}{{ with .updated }} · {{ . }}{{ end }} {{ with .description }}{{ . }}{{ end }} {{ end }}
{{ $ext }}{{ with $size }} · {{ . }}{{ end }}{{ with .updated }} · {{ . }}{{ end }}
{{ . }}