fix: Search
Some checks failed
Deploy Hugo Site / deploy (push) Has been cancelled

This commit is contained in:
SauravDhakal
2026-04-01 12:11:17 +05:45
parent 0c4e6715de
commit 3a1d508c65
7 changed files with 370 additions and 5 deletions

View File

@@ -0,0 +1,7 @@
{{- $.Scratch.Add "index" slice -}}
{{- range site.RegularPages -}}
{{- if and (not .Params.searchHidden) (ne .Layout `archives`) (ne .Layout `search`) }}
{{- $.Scratch.Add "index" (dict "title" .Title "content" .Plain "permalink" .Permalink "summary" .Summary "date" (.Date.Format "Jan 2, 2006")) -}}
{{- end }}
{{- end -}}
{{- $.Scratch.Get "index" | jsonify -}}