diff options
author | James Elliott <james-d-elliott@users.noreply.github.com> | 2022-06-25 14:54:54 +0300 |
---|---|---|
committer | James Elliott <james-d-elliott@users.noreply.github.com> | 2022-06-25 14:54:54 +0300 |
commit | 76d7db7b4c3514cebfd1631a2fdb29234b400221 (patch) | |
tree | 821421e8a5d89ccb0376352a9f762d63f2d5ea8a | |
parent | b532c69bd769353490e412e22d790e484aeb91dc (diff) |
feat: handle homepage for search sections show
-rw-r--r-- | layouts/partials/footer/script-footer.html | 2 | ||||
-rw-r--r-- | layouts/partials/header/header.html | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/layouts/partials/footer/script-footer.html b/layouts/partials/footer/script-footer.html index 1a571d1..7240b00 100644 --- a/layouts/partials/footer/script-footer.html +++ b/layouts/partials/footer/script-footer.html @@ -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 -}} diff --git a/layouts/partials/header/header.html b/layouts/partials/header/header.html index 77c24de..d6e0f6e 100644 --- a/layouts/partials/header/header.html +++ b/layouts/partials/header/header.html @@ -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 }} |