Make hugo generate a json index of the website
This commit is contained in:
parent
73355d27ed
commit
8df90589bf
2 changed files with 8 additions and 0 deletions
|
@ -29,6 +29,9 @@ resampleFilter = "CatmullRom"
|
||||||
quality = 75
|
quality = 75
|
||||||
anchor = "smart"
|
anchor = "smart"
|
||||||
|
|
||||||
|
[outputs]
|
||||||
|
home = ["HTML", "RSS", "JSON"]
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
copyright = "Julien (Adyxax) Dessaux"
|
copyright = "Julien (Adyxax) Dessaux"
|
||||||
github_repo = "https://git.adyxax.org/adyxax/www"
|
github_repo = "https://git.adyxax.org/adyxax/www"
|
||||||
|
|
5
layouts/index.json
Normal file
5
layouts/index.json
Normal file
|
@ -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 -}}
|
Loading…
Add table
Reference in a new issue