You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
682 B

  1. {{- define "main" -}}
  2. {{ $sections := (slice) }}
  3. {{ $tiers := (slice) }}
  4. {{ range $.Site.Sections }}
  5. {{ with .File }}
  6. {{ $sections = $sections | append (strings.TrimSuffix "/" .Dir) }}
  7. {{ end }}
  8. {{ end }}
  9. {{ $metasp := (dict) }}
  10. {{ range $k, $v := $.Site.Data.sandpointsnamegraph }}
  11. {{ if in $sections $k }}
  12. {{ $tiers = (slice) }}
  13. {{ range where $.Site.RegularPages "Section" $k }}
  14. {{ $tiers = $tiers | append .File.LogicalName }}
  15. {{ end }}
  16. {{ $metasp = merge $metasp (dict $v (merge (dict "singular" $k) (dict "tiers" $tiers))) }}
  17. {{ end }}
  18. {{ end }}
  19. {{ printf "METASP=%s;" (jsonify $metasp) }}
  20. {{ end }}