hugo-theme-relearn/layouts/index.json
Sören Weber 06486bdc3c
search: disable search in hidden branches #76
1-1-1-1 was previously displayed in the search results
2021-09-03 22:21:22 +02:00

7 lines
378 B
JSON

{{- $pages := slice }}
{{- range .Site.Pages }}
{{- if or (ne (.Scratch.Get "relearnIsHiddenTree") true) (ne .Site.Params.disableSearchHiddenPages true) }}
{{- $pages = $pages | append (dict "uri" .RelPermalink "title" .Title "tags" .Params.tags "description" .Description "content" (.Plain | htmlUnescape)) }}
{{- end }}
{{- end }}
{{- $pages | jsonify (dict "indent" " ") }}