hotfix: fixed search attributes
parent
35ad46c4c2
commit
1e356c8197
|
|
@ -3,7 +3,7 @@ title: InfluxDB Enterprise documentation
|
|||
description: >
|
||||
Documentation for InfluxDB Enterprise, which adds clustering, high availability, fine-grained authorization, and more to InfluxDB OSS.
|
||||
aliases:
|
||||
- /enterprise/v1.10/
|
||||
- /enterprise/v1.10/
|
||||
menu:
|
||||
enterprise_influxdb_v1:
|
||||
name: InfluxDB Enterprise v1.10
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
{{ $currentVersion := index $productPathData 1 }}
|
||||
{{ $latestV2 := .Site.Data.products.influxdb.latest }}
|
||||
{{ $fluxSupported := slice "influxdb" "enterprise_influxdb" }}
|
||||
{{ $influxdbFluxSupport := slice "v1.7" "v1.8" "v1.9" "cloud" }}
|
||||
{{ $includeFlux := cond (and (in $fluxSupported $product) (or (in $influxdbFluxSupport $currentVersion) (gt (len (findRE `v2\.` $currentVersion)) 0))) true false }}
|
||||
{{ $influxdbFluxSupport := slice "v1" "v2" "cloud" }}
|
||||
{{ $includeFlux := cond (and (in $fluxSupported $product) (in $influxdbFluxSupport $currentVersion)) true false }}
|
||||
{{ $includeResources := not (in (slice "cloud-serverless" "cloud-dedicated" "clustered") $currentVersion) }}
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js"></script>
|
||||
|
|
@ -28,7 +28,7 @@ docsearch({
|
|||
return 'Cloud Dedicated';
|
||||
} else if (version === 'clustered') {
|
||||
return 'Clustered';
|
||||
} else if (/v\d\./.test(version)) {
|
||||
} else if (/v\d+/.test(version)) {
|
||||
return version;
|
||||
} else {
|
||||
return '';
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
{{ $productPathData := findRE "[^/]+.*?" .RelPermalink }}
|
||||
{{ $product := index $productPathData 0 | default "" }}
|
||||
{{ $currentVersion := index $productPathData 1 | default ""}}
|
||||
{{ $latestFlux := .Site.Data.products.flux.latest }}
|
||||
{{ $fluxPath := print "/flux/" $latestFlux "/" }}
|
||||
{{ $fluxPath := print "/flux/v0/" }}
|
||||
{{ $isFluxLatest := cond (in .RelPermalink $fluxPath) true false }}
|
||||
{{ $isResources := cond (eq $product "resources") true false}}
|
||||
{{ $searchTag := print $product "-" $currentVersion }}
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
{{ .Scratch.Set "searchPlaceholder" (print "Search " (index .Site.Data.products $influxdbProductKey).name) }}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ .Scratch.Set "searchPlaceholder" (print "Search " (index .Site.Data.products $product).name " " $currentVersion) }}
|
||||
{{ .Scratch.Set "searchPlaceholder" (print "Search " (index .Site.Data.products $product).name) }}
|
||||
{{ end }}
|
||||
|
||||
{{ $searchPlaceholder := .Scratch.Get "searchPlaceholder" }}
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@
|
|||
{{ if eq $product "influxdb" }}
|
||||
{{ $replacementPath := index (index $influxdbInfo .name) "path" }}
|
||||
{{ $altProductPage := $.GetPage ((replaceRE $pageRoot $replacementPath $.Page.RelPermalink) | replaceRE `\/$` "") }}
|
||||
|
||||
|
||||
{{/* ////////////// GET ALT LINKS FROM FRONTMATTER ////////////// */}}
|
||||
{{ if (gt (len $altLinks) 0) }}
|
||||
{{ $productKey := index (index $influxdbInfo .name) "key" | default "" }}
|
||||
|
|
@ -73,14 +73,15 @@
|
|||
<ul class="item-list products" data-category="Self-managed">
|
||||
{{ range $sortedProducts }}
|
||||
{{ if eq .menu_category "self-managed" }}
|
||||
{{ $isCurrentProduct := and (eq .namespace $product) (in .versions $currentVersion) }}
|
||||
{{ $isCurrentProduct := and (eq .namespace $product) (in .versions $currentVersion) }}
|
||||
|
||||
{{ if not $isCurrentProduct }}
|
||||
{{ $scratch.Set "link" (print "/" .namespace "/" (index .versions 0) "/") }}
|
||||
|
||||
|
||||
{{ if eq $product "influxdb" }}
|
||||
{{ $replacementPath := index (index $influxdbInfo .name) "path" }}
|
||||
{{ $altProductPage := $.GetPage ((replaceRE $pageRoot $replacementPath $.Page.RelPermalink) | replaceRE `\/$` "") }}
|
||||
|
||||
|
||||
{{/* ////////////// GET ALT LINKS FROM FRONTMATTER ////////////// */}}
|
||||
{{ if (gt (len $altLinks) 0) }}
|
||||
{{ $productKey := index (index $influxdbInfo .name) "key" | default "" }}
|
||||
|
|
@ -91,12 +92,13 @@
|
|||
{{/* ///////////// GET DEFAULT ALT PAGE AT SAME PATH //////////// */}}
|
||||
{{ else if gt (len $altProductPage.Title) 0 }}
|
||||
{{ $scratch.Set "link" $altProductPage.RelPermalink }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ else if $isCurrentProduct }}
|
||||
{{ $scratch.Set "link" "" }}
|
||||
{{ end }}
|
||||
|
||||
{{ $link := $scratch.Get "link" }}
|
||||
<li>
|
||||
<a href='{{ $link }}' {{ if $isCurrentProduct }}class="active"{{ end }}>{{ if .altname }}{{.altname}}{{ else }}{{ .name }}{{ end }}</a>
|
||||
|
|
|
|||
Loading…
Reference in New Issue