Merge pull request #5835 from influxdata/get-product-edition

chore: Add product-key shortcode
pull/5833/head
Jason Stirnaman 2025-02-15 11:36:16 -06:00 committed by GitHub
commit 6de0ea00b8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 23 additions and 1 deletions

View File

@ -546,6 +546,25 @@ Insert warning markdown content here.
{{% /warn %}} {{% /warn %}}
``` ```
### Product data
Display the full product name and version name for the current page--for example:
- InfluxDB 3 Core
- InfluxDB 3 Cloud Dedicated
```md
{{% product-name %}}
```
Display the short version name (part of the key used in `products.yml`) from the current page URL--for example:
- `/influxdb3/core` returns `core`
```md
{{% product-key %}}
```
### Enterprise Content ### Enterprise Content
For sections content that relate specifically to InfluxDB Enterprise, use the `{{% enterprise %}}` shortcode. For sections content that relate specifically to InfluxDB Enterprise, use the `{{% enterprise %}}` shortcode.

View File

@ -255,7 +255,7 @@ influxdb3 install package <PACKAGE_NAME>
--name CONTAINER_NAME \ --name CONTAINER_NAME \
-v /path/to/.influxdb3/data:/data \ -v /path/to/.influxdb3/data:/data \
-v /path/to/.influxdb3/plugins:/plugins \ -v /path/to/.influxdb3/plugins:/plugins \
quay.io/influxdb/influxdb3-core:latest \ quay.io/influxdb/influxdb3-{{< product-key >}}:latest \
serve --node-id=node0 \ serve --node-id=node0 \
--object-store=file \ --object-store=file \
--data-dir=/data \ --data-dir=/data \

View File

@ -0,0 +1,3 @@
{{- $productPathData := findRE "[^/]+.*?" .Page.RelPermalink -}}
{{- $currentProduct := index $productPathData 1 -}}
{{ $currentProduct }}