Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/zzossig/hugo-theme-zzo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/index.json')
-rw-r--r--layouts/index.json6
1 files changed, 5 insertions, 1 deletions
diff --git a/layouts/index.json b/layouts/index.json
index 98a3da9..d2ba08a 100644
--- a/layouts/index.json
+++ b/layouts/index.json
@@ -2,7 +2,11 @@
{{- $.Scratch.Add "searchindex" slice -}}
{{- range $index, $element := (where .Site.RegularPages "Kind" "page") -}}
{{ with $element.Plain }}
- {{- $.Scratch.Add "searchindex" (dict "id" $index "title" $element.Title "uri" $element.Permalink "tags" $element.Params.tags "section" $element.Section "content" $element.Plain "description" $element.Description) -}}
+ {{- if $.Param "searchContent" -}}
+ {{- $.Scratch.Add "searchindex" (dict "id" $index "title" $element.Title "uri" $element.Permalink "tags" $element.Params.tags "section" $element.Section "content" $element.Plain "description" $element.Description) -}}
+ {{ else }}
+ {{- $.Scratch.Add "searchindex" (dict "id" $index "title" $element.Title "uri" $element.Permalink "tags" $element.Params.tags "section" $element.Section "description" $element.Description) -}}
+ {{- end -}}
{{ end }}
{{- end -}}
{{- $.Scratch.Get "searchindex" | jsonify -}} \ No newline at end of file