feat: handle homepage for search sections show
This commit is contained in:
parent
b532c69bd7
commit
76d7db7b4c
|
@ -40,7 +40,7 @@
|
|||
{{ $flexSearch := resources.Get "js/vendor/flexsearch/dist/flexsearch.bundle.js" -}}
|
||||
{{ $slice = $slice | append $flexSearch -}}
|
||||
{{ if and (isset .Site.Params.options "searchsectionsshow") (not (eq .Site.Params.options.searchSectionsShow "ALL")) -}}
|
||||
{{ $showFlexSearch = or (eq (len .Site.Params.options.searchSectionsShow) 0) (in .Site.Params.options.searchSectionsShow .Section) -}}
|
||||
{{ $showFlexSearch = or (eq (len .Site.Params.options.searchSectionsShow) 0) (in .Site.Params.options.searchSectionsShow .Section) (and .IsHome (in .Site.Params.options.searchSectionsShow "HomePage")) -}}
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
|
||||
|
|
|
@ -80,7 +80,7 @@
|
|||
{{- $showFlexSearch := .Site.Params.options.flexSearch }}
|
||||
{{- if $showFlexSearch }}
|
||||
{{- if and (isset .Site.Params.options "searchsectionsshow") (not (eq .Site.Params.options.searchSectionsShow "ALL")) }}
|
||||
{{- $showFlexSearch = or (eq (len .Site.Params.options.searchSectionsShow) 0) (in .Site.Params.options.searchSectionsShow .Section) }}
|
||||
{{- $showFlexSearch = or (eq (len .Site.Params.options.searchSectionsShow) 0) (in .Site.Params.options.searchSectionsShow .Section) (and .IsHome (in .Site.Params.options.searchSectionsShow "HomePage")) }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
|
|
Loading…
Reference in New Issue