diff options
author | Julien Dessaux | 2021-08-23 19:32:05 +0200 |
---|---|---|
committer | Julien Dessaux | 2021-08-23 19:32:05 +0200 |
commit | 8df90589bf62d633eb1f0c1e6d4fc50445628923 (patch) | |
tree | 6c9d40b8f0f528e7e90bbef28a15218f61ddb119 | |
parent | Added wireguard docs article for alpine (diff) | |
download | www-8df90589bf62d633eb1f0c1e6d4fc50445628923.tar.gz www-8df90589bf62d633eb1f0c1e6d4fc50445628923.tar.bz2 www-8df90589bf62d633eb1f0c1e6d4fc50445628923.zip |
Make hugo generate a json index of the website
Diffstat (limited to '')
-rw-r--r-- | config.toml | 3 | ||||
-rw-r--r-- | layouts/index.json | 5 |
2 files changed, 8 insertions, 0 deletions
diff --git a/config.toml b/config.toml index 7294f53..cc41e95 100644 --- a/config.toml +++ b/config.toml @@ -29,6 +29,9 @@ resampleFilter = "CatmullRom" quality = 75 anchor = "smart" +[outputs] +home = ["HTML", "RSS", "JSON"] + [params] copyright = "Julien (Adyxax) Dessaux" github_repo = "https://git.adyxax.org/adyxax/www" diff --git a/layouts/index.json b/layouts/index.json new file mode 100644 index 0000000..a526e68 --- /dev/null +++ b/layouts/index.json @@ -0,0 +1,5 @@ +{{- $.Scratch.Add "index" slice -}} +{{- range .Site.RegularPages -}} + {{- $.Scratch.Add "index" (dict "title" .Title "subtitle" .Params.subtitle "description" .Params.description "tags" .Params.tags "content" .Plain "permalink" .Permalink) -}} +{{- end -}} +{{- $.Scratch.Get "index" | jsonify -}} |