  {{ $instantPage := resources.Get "js/instant.page.js" -}}
  {{ $instantPage := $instantPage | js.Build -}}
  {{ $slice = $slice | append $instantPage -}}
{{ end -}}

{{ $showFlexSearch := .Site.Params.options.flexSearch }}

{{ if $showFlexSearch -}}
  {{ $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")) -}}
  {{