Add search

This commit is contained in:
Will Faught
2022-12-12 19:29:19 -08:00
parent 038f020aee
commit 11561c1853
6 changed files with 134 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
{{- $.Scratch.Add "index" slice -}}
{{- range .Site.RegularPages -}}
{{- $.Scratch.Add "index" (dict "title" (.Title | markdownify | plainify | htmlUnescape) "description" (.Description | markdownify | plainify | htmlUnescape) "date" .PublishDate "categories" .Params.categories "tags" .Params.tags "keywords" .Params.keywords "text" (strings.TrimRight " " (replace (.Plain | htmlUnescape) "\n" " ")) "link" .RelPermalink) -}}
{{- end -}}
{{- $.Scratch.Get "index" | jsonify -}}

View File

@@ -0,0 +1,4 @@
{{ define "main" }}
{{ partial "paige_main.html" . }}
{{ partial "paige_search.html" . }}
{{ end }}