From 05d04912ed63cf8eff8961d857565472114a93ab Mon Sep 17 00:00:00 2001 From: Stefan Ritter Date: Sat, 1 Apr 2023 09:22:13 +0200 Subject: [PATCH] Example --- data.json | 10 ++++++++++ template.html | 10 ++++++++++ 2 files changed, 20 insertions(+) create mode 100644 data.json create mode 100644 template.html diff --git a/data.json b/data.json new file mode 100644 index 0000000..252e975 --- /dev/null +++ b/data.json @@ -0,0 +1,10 @@ +{ + "01 Foo": { + "01 Egg": "http://egg", + "02 Ham": "http://ham" + }, + "02 Bar": { + "01 Spam": "http://spam", + "02 Drum": "http://drum" + } +} diff --git a/template.html b/template.html new file mode 100644 index 0000000..35a535a --- /dev/null +++ b/template.html @@ -0,0 +1,10 @@ +{{ range $section, $content := .Site.Data.data }} +{{ $title := substr $section 3 }} +{{ $title }} + +{{ end }}