wip(search): add index.json

This commit is contained in:
geekifan
2025-04-26 12:40:11 +08:00
parent 7f26f327fb
commit 7399c4f7a1
2 changed files with 27 additions and 0 deletions

View 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 -}}