wip(search): add index.json
This commit is contained in:
22
hugo.toml
22
hugo.toml
@ -4,6 +4,28 @@ title = 'Chirpy'
|
|||||||
enableGitInfo = true
|
enableGitInfo = true
|
||||||
paginate = 5 # 每页显示的文章数量
|
paginate = 5 # 每页显示的文章数量
|
||||||
|
|
||||||
|
[outputs]
|
||||||
|
home = ["HTML", "RSS", "JSON"]
|
||||||
|
|
||||||
|
[markup.highlight]
|
||||||
|
anchorLineNos = false
|
||||||
|
codeFences = true
|
||||||
|
guessSyntax = true
|
||||||
|
hl_Lines = ''
|
||||||
|
hl_inline = false
|
||||||
|
lineAnchors = ''
|
||||||
|
lineNoStart = 1
|
||||||
|
lineNos = true
|
||||||
|
lineNumbersInTable = true
|
||||||
|
noClasses = false
|
||||||
|
tabWidth = 4
|
||||||
|
wrapperClass = 'highlight'
|
||||||
|
[markup.goldmark.parser.attribute]
|
||||||
|
block = true
|
||||||
|
title = true
|
||||||
|
[markup.goldmark.renderer]
|
||||||
|
unsafe = true
|
||||||
|
|
||||||
[taxonomies]
|
[taxonomies]
|
||||||
category = "categories"
|
category = "categories"
|
||||||
tag = "tags"
|
tag = "tags"
|
||||||
|
5
layouts/_default/index.json
Normal file
5
layouts/_default/index.json
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{{- $.Scratch.Add "index" slice -}}
|
||||||
|
{{- range .Site.RegularPages -}}
|
||||||
|
{{- $.Scratch.Add "index" (dict "title" .Title "tags" .Params.tags "categories" .Params.categories "contents" .Plain "permalink" .Permalink) -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- $.Scratch.Get "index" | jsonify -}}
|
Reference in New Issue
Block a user