From 92f11596022523879342a80c30482a0622d77fd1 Mon Sep 17 00:00:00 2001 From: Alexander Neonxp Kiryukhin Date: Mon, 16 Dec 2024 16:37:19 +0300 Subject: Auto-commit 2024-12-16 --- hugo.toml | 2 +- layouts/_default/section.json | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 layouts/_default/section.json diff --git a/hugo.toml b/hugo.toml index 23327ba..7e57f6d 100644 --- a/hugo.toml +++ b/hugo.toml @@ -109,7 +109,7 @@ tabWidth = 4 [outputs] page = ["html"] home = ["html", "json"] -section = ["html", "rss"] +section = ["html", "rss", "json"] [pagination] diff --git a/layouts/_default/section.json b/layouts/_default/section.json new file mode 100644 index 0000000..9317e4c --- /dev/null +++ b/layouts/_default/section.json @@ -0,0 +1,5 @@ +{{- $.Scratch.Add "index" slice -}} +{{- range .Pages -}} + {{- $.Scratch.Add "index" (dict "title" .Title "tags" .Params.tags "categories" .Params.categories "contents" .RawContent "permalink" .Permalink) -}} +{{- end -}} +{{- $.Scratch.Get "index" | jsonify -}} -- cgit v1.2.3