forked from Sync/hugo-theme-stack
5d100a7f99
* feat(archives): add search bar to archives page * fix: error `file is nil; wrap it in if or with` from Hugo 0.123.0 * style: rename `search.ts` to `archives.ts` * refactor: remove `search` page layout * doc: remove `search` from `exampleSite` * fix: generate JSON output for archives page in exampleSite * feat: put archives search form under categories list
13 lines
316 B
JSON
13 lines
316 B
JSON
{{- $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections -}}
|
|
{{- $result := slice -}}
|
|
|
|
{{- range $pages -}}
|
|
{{- $data := dict
|
|
"title" .Title
|
|
"content" (.Plain)
|
|
"id" .File.UniqueID
|
|
-}}
|
|
{{- $result = $result | append $data -}}
|
|
{{- end -}}
|
|
|
|
{{ jsonify $result }} |