hextra/assets/json/search-data.json
Xin 7e37b73779 feat: revamp search experience
chore: hide toc on small screen

chore: make sidebar responsive
2023-08-16 20:39:54 +01:00

15 lines
546 B
JSON

{{- $pages := where .Site.Pages "Kind" "in" (slice "page" "section") -}}
{{- $pages = where $pages "Params.excludeSearch" "!=" true -}}
{{- $pages = where $pages "Content" "!=" "" -}}
{{- $output := dict -}}
{{- range $index, $page := $pages -}}
{{- $pageTitle := $page.LinkTitle | default $page.File.BaseFileName -}}
{{- $pageLink := $page.RelPermalink -}}
{{- $data := partial "utils/fragments" $page -}}
{{- $output = $output | merge (dict $pageLink (dict "title" $pageTitle "data" $data)) -}}
{{- end -}}
{{- $output | jsonify -}}