diff --git a/config.yaml b/config.yaml index 77a102c..0b3e477 100644 --- a/config.yaml +++ b/config.yaml @@ -19,6 +19,12 @@ params: author: Gitea website: https://blog.gitea.io +outputs: + home: + - HTML + - RSS + - JSON + menu: page: - name: Website diff --git a/layouts/index.json b/layouts/index.json new file mode 100644 index 0000000..5aea325 --- /dev/null +++ b/layouts/index.json @@ -0,0 +1,5 @@ +{{- $.Scratch.Add "index" slice -}} +{{- range .Site.RegularPages -}} +{{- $.Scratch.Add "index" (dict "title" .Title "tags" .Params.tags "contents" .Plain "permalink" .Permalink) -}} +{{- end -}} +{{- $.Scratch.Get "index" | jsonify -}}