Skip to content

Instantly share code, notes, and snippets.

@lhstraathof
Created September 23, 2017 17:55
Show Gist options
  • Save lhstraathof/f7d701b40bb7fa42a0b0dbe2b578a684 to your computer and use it in GitHub Desktop.
Save lhstraathof/f7d701b40bb7fa42a0b0dbe2b578a684 to your computer and use it in GitHub Desktop.
Get data from DIrectus CMS in Hugo
<ul>
{{ $data := getJSON "https://cms.dev:8890/api/1.1/tables/settings/rows?access_token=vpqBqeRX4CGw2OgDdZxv9H26Rw8mIo4Z" }}
{{ range $data.data }}
{{ if .site_name }}
<li>{{ .site_name }}</li>
{{ end }}
{{ end }}
</ul>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment