backy/docs/themes/hugo-theme-relearn/layouts/_default/index.search.js
Andrew Woodlee 4b382bddd9 v0.3.0
* Getting environment variables and passwords from Vault (not tested
yet)
* Vault configuration to config (not tested yet)
* Ability to run scripts from file on local machine on the remote host
* Ability to get ouput in the notification of a list for individual
commands or all commands
* Make SSH connections close after all commands have been run; reuse
previous connections if needed
2023-07-01 21:46:54 -05:00

22 lines
996 B
JavaScript

{{- partialCached "page-meta.hugo" . .RelPermalink }}
{{- $pages := slice }}
{{- range .Site.Pages }}
{{- if and .Title (or (ne (.Scratch.Get "relearnIsHiddenStem") true) (ne .Site.Params.disableSearchHiddenPages true) ) }}
{{- $title := .Title }}
{{- if eq .Kind "taxonomy" }}
{{- $title = i18n .Data.Plural }}
{{- if not $title }}
{{- $title = .Data.Plural | humanize }}
{{- end }}
{{- else if eq .Kind "term" }}
{{- $title = i18n .Data.Singular }}
{{- if not $title }}
{{- $title = .Data.Singular | humanize }}
{{- end }}
{{- $title = printf "%s %s %s" $title (default "::" .Site.Params.titleSeparator) .Title }}
{{- end }}
{{- $pages = $pages | append (dict "uri" (partial "relLangPrettyUglyURL.hugo" (dict "to" .)) "title" $title "tags" .Params.tags "description" .Description "content" (.Plain | htmlUnescape)) }}
{{- end }}
{{- end -}}
var relearn_search_index = {{ $pages | jsonify (dict "indent" " ") }}