docs-v2/layouts/partials/footer/search.html

22 lines
989 B
HTML

{{ $productPathData := findRE "[^/]+.*?" .RelPermalink }}
{{ $product := index $productPathData 0 }}
{{ $version := index $productPathData 1 }}
{{ $latestV2 := .Site.Data.products.influxdb.latest }}
{{ $fluxSupported := slice "influxdb" "enterprise_influxdb" }}
{{ $influxdbFluxSupport := slice "v1" "v2" "cloud" }}
{{ $includeFlux := and (in $fluxSupported $product) (in $influxdbFluxSupport $version) }}
{{ $includeResources := not (in (slice "cloud-serverless" "cloud-dedicated" "clustered" "core" "enterprise" "explorer") $version) }}
<!-- DocSearch Component Container -->
<div
data-component="doc-search"
data-api-key="501434b53a46a92a7931aecc7c9672e2"
data-app-id="WHM9UWMP6M"
data-index-name="influxdata"
data-input-selector="#algolia-search-input"
data-search-tag="{{ $product }}-{{ $version }}"
data-include-flux="{{ $includeFlux }}"
data-include-resources="{{ $includeResources }}"
data-debug="{{ if hugo.IsProduction }}false{{ else }}true{{ end }}"
></div>