2023-09-06 12:21:47 +00:00
|
|
|
{{- $productPathData := findRE "[^/]+.*?" .Page.RelPermalink -}}
|
|
|
|
{{- $currentProduct := index $productPathData 1 -}}
|
|
|
|
{{- $length := .Get 0 | default "long" -}}
|
|
|
|
{{- $omit := .Get "omit" | default "" -}}
|
|
|
|
{{- $scratch := newScratch -}}
|
2023-12-27 21:07:47 +00:00
|
|
|
{{- if eq $currentProduct "v2" -}}
|
|
|
|
{{- $scratch.Set "productData" .Site.Data.products.influxdb -}}
|
|
|
|
{{- else if eq $currentProduct "cloud" -}}
|
2023-09-06 12:21:47 +00:00
|
|
|
{{- $scratch.Set "productData" .Site.Data.products.influxdb_cloud -}}
|
|
|
|
{{- else if eq $currentProduct "cloud-serverless" -}}
|
|
|
|
{{- $scratch.Set "productData" .Site.Data.products.influxdb_cloud_serverless -}}
|
|
|
|
{{- else if eq $currentProduct "cloud-dedicated" -}}
|
|
|
|
{{- $scratch.Set "productData" .Site.Data.products.influxdb_cloud_dedicated -}}
|
|
|
|
{{- else if eq $currentProduct "clustered" -}}
|
|
|
|
{{- $scratch.Set "productData" .Site.Data.products.influxdb_clustered -}}
|
|
|
|
{{- end -}}
|
|
|
|
{{- $productData := $scratch.Get "productData" -}}
|
|
|
|
{{- if eq $length "long" }}
|
|
|
|
{{- $productData.name | replaceRE $omit "" -}}
|
|
|
|
{{ else if eq $length "short" }}
|
|
|
|
{{- $productData.altname | replaceRE $omit "" -}}
|
|
|
|
{{ end -}}
|