Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Hugo render from JSON file data
<!-- posts.json must be at root level -->
{{ $items := getJSON "posts.json" }}
{{ range $item := $items }}
<a href="{{ $item.url }}">{{ $ }}</a>
{{ end }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment