diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index cb475d703..dfec47515 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -669,16 +669,16 @@ list_code_example: | ~~~ #### Organize and include native code examples -To include text from a file in `/assets/text/`, use the -`{{< get-assets-text >}}` shortcode and provide the relative path and filename. +To include text from a file in `/shared/text/`, use the +`{{< get-shared-text >}}` shortcode and provide the relative path and filename. This is useful for maintaining and referencing sample code variants in their native file formats. -1. Store code examples in their native formats at `/assets/text/`. +1. Store code examples in their native formats at `/shared/text/`. ```md - /assets/text/example1/example.js - /assets/text/example1/example.py + /shared/text/example1/example.js + /shared/text/example1/example.py ``` 2. Include the files, e.g. in code tabs @@ -690,12 +690,12 @@ This is useful for maintaining and referencing sample code variants in their {{% /code-tabs %}} {{% code-tab-content %}} ```js - {{< get-assets-text "example1/example.js" >}} + {{< get-shared-text "example1/example.js" >}} ``` {{% /code-tab-content %}} {{% code-tab-content %}} ```py - {{< get-assets-text "example1/example.py" >}} + {{< get-shared-text "example1/example.py" >}} ``` {{% /code-tab-content %}} {{% /code-tabs-wrapper %}} diff --git a/content/influxdb/cloud/organizations/buckets/bucket-schema/_index.md b/content/influxdb/cloud/organizations/buckets/bucket-schema/_index.md index d5a29352d..2da29eeb7 100644 --- a/content/influxdb/cloud/organizations/buckets/bucket-schema/_index.md +++ b/content/influxdb/cloud/organizations/buckets/bucket-schema/_index.md @@ -37,7 +37,7 @@ Use the `influx` CLI to set the schema-type and measurement schemas for your buc 1. Create a bucket with the `schema-type` flag set to `explicit`. ```sh - {{< get-assets-text "bucket-schema/bucket-schema-type.sh" >}} + {{< get-shared-text "bucket-schema/bucket-schema-type.sh" >}} ``` 2. Use your text editor to create a schema columns file for each measurement you want to add. @@ -52,17 +52,17 @@ as in the following examples: {{% /code-tabs %}} {{% code-tab-content %}} ```sh -{{< get-assets-text "bucket-schema/usage-resources.csv" >}} +{{< get-shared-text "bucket-schema/usage-resources.csv" >}} ``` {{% /code-tab-content %}} {{% code-tab-content %}} ```json -{{< get-assets-text "bucket-schema/usage-cpu.json" >}} +{{< get-shared-text "bucket-schema/usage-cpu.json" >}} ``` {{% /code-tab-content %}} {{% code-tab-content %}} ```json -{{< get-assets-text "bucket-schema/sensor.ndjson" >}} +{{< get-shared-text "bucket-schema/sensor.ndjson" >}} ``` {{% /code-tab-content %}} {{% /code-tabs-wrapper %}} @@ -118,7 +118,7 @@ Use the [`extended-output` flag](/influxdb/cloud/reference/cli/influx/bucket-sch ```sh # sensor.ndjson - {{< get-assets-text "bucket-schema/sensor.ndjson" >}} + {{< get-shared-text "bucket-schema/sensor.ndjson" >}} ``` ```sh diff --git a/content/influxdb/cloud/organizations/buckets/create-bucket.md b/content/influxdb/cloud/organizations/buckets/create-bucket.md index 9301af428..dddd649fc 100644 --- a/content/influxdb/cloud/organizations/buckets/create-bucket.md +++ b/content/influxdb/cloud/organizations/buckets/create-bucket.md @@ -72,7 +72,7 @@ influx bucket create -n my-bucket -o my-org -r 72h 1. ```sh - {{< get-assets-text "bucket-schema/bucket-schema-type.sh" >}} + {{< get-shared-text "bucket-schema/bucket-schema-type.sh" >}} ``` 2. Create a bucket schema. For more information, see [Manage bucket schemas](/influxdb/cloud/organizations/buckets/bucket-schema/). diff --git a/content/influxdb/cloud/reference/api/influxdb-1x/_index.md b/content/influxdb/cloud/reference/api/influxdb-1x/_index.md index 7008671e4..395078035 100644 --- a/content/influxdb/cloud/reference/api/influxdb-1x/_index.md +++ b/content/influxdb/cloud/reference/api/influxdb-1x/_index.md @@ -54,12 +54,12 @@ Authorization: Token <token> {{% /code-tabs %}} {{% code-tab-content %}} ```sh -{{% get-assets-text "api/v1-compat/auth/oss/token-auth.sh" %}} +{{% get-shared-text "api/v1-compat/auth/oss/token-auth.sh" %}} ``` {{% /code-tab-content %}} {{% code-tab-content %}} ```js -{{% get-assets-text "api/v1-compat/auth/oss/token-auth.js" %}} +{{% get-shared-text "api/v1-compat/auth/oss/token-auth.js" %}} ``` {{% /code-tab-content %}} {{< /code-tabs-wrapper >}} @@ -96,12 +96,12 @@ Authorization: Basic <username>:<password> {{% /code-tabs %}} {{% code-tab-content %}} ```sh -{{% get-assets-text "api/v1-compat/auth/oss/basic-auth.sh" %}} +{{% get-shared-text "api/v1-compat/auth/oss/basic-auth.sh" %}} ``` {{% /code-tab-content %}} {{% code-tab-content %}} ```js -{{% get-assets-text "api/v1-compat/auth/cloud/basic-auth.js" %}} +{{% get-shared-text "api/v1-compat/auth/cloud/basic-auth.js" %}} ``` {{% /code-tab-content %}} {{< /code-tabs-wrapper >}} @@ -132,12 +132,12 @@ Use InfluxDB 1.x API parameters to provide username and password credentials thr {{% /code-tabs %}} {{% code-tab-content %}} ```sh -{{% get-assets-text "api/v1-compat/auth/oss/querystring-auth.sh" %}} +{{% get-shared-text "api/v1-compat/auth/oss/querystring-auth.sh" %}} ``` {{% /code-tab-content %}} {{% code-tab-content %}} ```js -{{% get-assets-text "api/v1-compat/auth/oss/querystring-auth.js" %}} +{{% get-shared-text "api/v1-compat/auth/oss/querystring-auth.js" %}} ``` {{% /code-tab-content %}} {{< /code-tabs-wrapper >}} diff --git a/content/influxdb/cloud/reference/api/influxdb-1x/query.md b/content/influxdb/cloud/reference/api/influxdb-1x/query.md index dcee5160f..9f3feaf9a 100644 --- a/content/influxdb/cloud/reference/api/influxdb-1x/query.md +++ b/content/influxdb/cloud/reference/api/influxdb-1x/query.md @@ -91,12 +91,12 @@ The following precisions are available: {{% /code-tabs %}} {{% code-tab-content %}} ```sh -{{% get-assets-text "api/v1-compat/auth/cloud/basic-auth.sh" %}} +{{% get-shared-text "api/v1-compat/auth/cloud/basic-auth.sh" %}} ``` {{% /code-tab-content %}} {{% code-tab-content %}} ```js -{{% get-assets-text "api/v1-compat/auth/cloud/basic-auth.js" %}} +{{% get-shared-text "api/v1-compat/auth/cloud/basic-auth.js" %}} ``` {{% /code-tab-content %}} {{< /code-tabs-wrapper >}} diff --git a/content/influxdb/v2.0/api-guide/api_intro.md b/content/influxdb/v2.0/api-guide/api_intro.md index b3cd7cf8e..8b92fea49 100644 --- a/content/influxdb/v2.0/api-guide/api_intro.md +++ b/content/influxdb/v2.0/api-guide/api_intro.md @@ -43,12 +43,12 @@ Include your authentication token as an `Authorization` header in each request. {{% /code-tabs %}} {{% code-tab-content %}} ```sh -{{% get-assets-text "api/v2.0/auth/oss/token-auth.sh" %}} +{{% get-shared-text "api/v2.0/auth/oss/token-auth.sh" %}} ``` {{% /code-tab-content %}} {{% code-tab-content %}} ```js -{{% get-assets-text "api/v2.0/auth/oss/token-auth.js" %}} +{{% get-shared-text "api/v2.0/auth/oss/token-auth.js" %}} ``` {{% /code-tab-content %}} {{< /code-tabs-wrapper >}} diff --git a/content/influxdb/v2.0/reference/api/influxdb-1x/_index.md b/content/influxdb/v2.0/reference/api/influxdb-1x/_index.md index 78115ce75..3e133ba39 100644 --- a/content/influxdb/v2.0/reference/api/influxdb-1x/_index.md +++ b/content/influxdb/v2.0/reference/api/influxdb-1x/_index.md @@ -49,12 +49,12 @@ Authorization: Token <token> {{% /code-tabs %}} {{% code-tab-content %}} ```sh -{{% get-assets-text "api/v1-compat/auth/oss/token-auth.sh" %}} +{{% get-shared-text "api/v1-compat/auth/oss/token-auth.sh" %}} ``` {{% /code-tab-content %}} {{% code-tab-content %}} ```js -{{% get-assets-text "api/v1-compat/auth/oss/token-auth.js" %}} +{{% get-shared-text "api/v1-compat/auth/oss/token-auth.js" %}} ``` {{% /code-tab-content %}} {{< /code-tabs-wrapper >}} @@ -103,12 +103,12 @@ Authorization: Basic <username>:<password> {{% /code-tabs %}} {{% code-tab-content %}} ```sh -{{% get-assets-text "api/v1-compat/auth/oss/basic-auth.sh" %}} +{{% get-shared-text "api/v1-compat/auth/oss/basic-auth.sh" %}} ``` {{% /code-tab-content %}} {{% code-tab-content %}} ```js -{{% get-assets-text "api/v1-compat/auth/oss/basic-auth.js" %}} +{{% get-shared-text "api/v1-compat/auth/oss/basic-auth.js" %}} ``` {{% /code-tab-content %}} {{< /code-tabs-wrapper >}} @@ -139,12 +139,12 @@ Use InfluxDB 1.x API parameters to provide credentials through the query string. {{% /code-tabs %}} {{% code-tab-content %}} ```sh -{{< get-assets-text "api/v1-compat/auth/oss/querystring-auth.sh" >}} +{{< get-shared-text "api/v1-compat/auth/oss/querystring-auth.sh" >}} ``` {{% /code-tab-content %}} {{% code-tab-content %}} ```js -{{< get-assets-text "api/v1-compat/auth/oss/querystring-auth.js" >}} +{{< get-shared-text "api/v1-compat/auth/oss/querystring-auth.js" >}} ``` {{% /code-tab-content %}} {{< /code-tabs-wrapper >}} diff --git a/content/influxdb/v2.0/reference/api/influxdb-1x/query.md b/content/influxdb/v2.0/reference/api/influxdb-1x/query.md index e4bafeee3..4c36392f0 100644 --- a/content/influxdb/v2.0/reference/api/influxdb-1x/query.md +++ b/content/influxdb/v2.0/reference/api/influxdb-1x/query.md @@ -96,12 +96,12 @@ The following precisions are available: {{% /code-tabs %}} {{% code-tab-content %}} ```sh -{{% get-assets-text "api/v1-compat/auth/oss/basic-auth.sh" %}} +{{% get-shared-text "api/v1-compat/auth/oss/basic-auth.sh" %}} ``` {{% /code-tab-content %}} {{% code-tab-content %}} ```js -{{% get-assets-text "api/v1-compat/auth/oss/basic-auth.js" %}} +{{% get-shared-text "api/v1-compat/auth/oss/basic-auth.js" %}} ``` {{% /code-tab-content %}} {{< /code-tabs-wrapper >}} diff --git a/content/influxdb/v2.0/reference/cli/influx/bucket/create.md b/content/influxdb/v2.0/reference/cli/influx/bucket/create.md index b482c9f05..25f9c58b4 100644 --- a/content/influxdb/v2.0/reference/cli/influx/bucket/create.md +++ b/content/influxdb/v2.0/reference/cli/influx/bucket/create.md @@ -101,5 +101,5 @@ For more information, see [Manage bucket schema](/influxdb/cloud/organizations/b {{% /cloud %}} ```sh -{{< get-assets-text "bucket-schema/bucket-schema-type.sh" >}} +{{< get-shared-text "bucket-schema/bucket-schema-type.sh" >}} ``` diff --git a/layouts/shortcodes/get-assets-text.html b/layouts/shortcodes/get-assets-text.html deleted file mode 100644 index a34d39ef0..000000000 --- a/layouts/shortcodes/get-assets-text.html +++ /dev/null @@ -1,2 +0,0 @@ -{{- $file := resources.Get (printf "text/%s" ($.Get 0)) -}} -{{- $file.Content | safeHTML -}} diff --git a/layouts/shortcodes/get-shared-text.html b/layouts/shortcodes/get-shared-text.html new file mode 100644 index 000000000..029657f39 --- /dev/null +++ b/layouts/shortcodes/get-shared-text.html @@ -0,0 +1,2 @@ +{{- $file := (printf "/shared/text/%s" ($.Get 0)) -}} +{{- readFile $file | safeHTML -}} diff --git a/assets/text/api/v1-compat/auth/cloud/basic-auth.js b/shared/text/api/v1-compat/auth/cloud/basic-auth.js similarity index 100% rename from assets/text/api/v1-compat/auth/cloud/basic-auth.js rename to shared/text/api/v1-compat/auth/cloud/basic-auth.js diff --git a/assets/text/api/v1-compat/auth/cloud/basic-auth.sh b/shared/text/api/v1-compat/auth/cloud/basic-auth.sh similarity index 100% rename from assets/text/api/v1-compat/auth/cloud/basic-auth.sh rename to shared/text/api/v1-compat/auth/cloud/basic-auth.sh diff --git a/assets/text/api/v1-compat/auth/oss/basic-auth.js b/shared/text/api/v1-compat/auth/oss/basic-auth.js similarity index 100% rename from assets/text/api/v1-compat/auth/oss/basic-auth.js rename to shared/text/api/v1-compat/auth/oss/basic-auth.js diff --git a/assets/text/api/v1-compat/auth/oss/basic-auth.sh b/shared/text/api/v1-compat/auth/oss/basic-auth.sh similarity index 100% rename from assets/text/api/v1-compat/auth/oss/basic-auth.sh rename to shared/text/api/v1-compat/auth/oss/basic-auth.sh diff --git a/assets/text/api/v1-compat/auth/oss/querystring-auth.js b/shared/text/api/v1-compat/auth/oss/querystring-auth.js similarity index 100% rename from assets/text/api/v1-compat/auth/oss/querystring-auth.js rename to shared/text/api/v1-compat/auth/oss/querystring-auth.js diff --git a/assets/text/api/v1-compat/auth/oss/querystring-auth.sh b/shared/text/api/v1-compat/auth/oss/querystring-auth.sh similarity index 100% rename from assets/text/api/v1-compat/auth/oss/querystring-auth.sh rename to shared/text/api/v1-compat/auth/oss/querystring-auth.sh diff --git a/assets/text/api/v1-compat/auth/oss/token-auth.js b/shared/text/api/v1-compat/auth/oss/token-auth.js similarity index 100% rename from assets/text/api/v1-compat/auth/oss/token-auth.js rename to shared/text/api/v1-compat/auth/oss/token-auth.js diff --git a/assets/text/api/v1-compat/auth/oss/token-auth.sh b/shared/text/api/v1-compat/auth/oss/token-auth.sh similarity index 100% rename from assets/text/api/v1-compat/auth/oss/token-auth.sh rename to shared/text/api/v1-compat/auth/oss/token-auth.sh diff --git a/assets/text/api/v2.0/auth/oss/token-auth.js b/shared/text/api/v2.0/auth/oss/token-auth.js similarity index 100% rename from assets/text/api/v2.0/auth/oss/token-auth.js rename to shared/text/api/v2.0/auth/oss/token-auth.js diff --git a/assets/text/api/v2.0/auth/oss/token-auth.sh b/shared/text/api/v2.0/auth/oss/token-auth.sh similarity index 100% rename from assets/text/api/v2.0/auth/oss/token-auth.sh rename to shared/text/api/v2.0/auth/oss/token-auth.sh diff --git a/assets/text/bucket-schema/bucket-schema-columns.sh b/shared/text/bucket-schema/bucket-schema-columns.sh similarity index 100% rename from assets/text/bucket-schema/bucket-schema-columns.sh rename to shared/text/bucket-schema/bucket-schema-columns.sh diff --git a/assets/text/bucket-schema/bucket-schema-type.sh b/shared/text/bucket-schema/bucket-schema-type.sh similarity index 100% rename from assets/text/bucket-schema/bucket-schema-type.sh rename to shared/text/bucket-schema/bucket-schema-type.sh diff --git a/assets/text/bucket-schema/sensor.ndjson b/shared/text/bucket-schema/sensor.ndjson similarity index 100% rename from assets/text/bucket-schema/sensor.ndjson rename to shared/text/bucket-schema/sensor.ndjson diff --git a/assets/text/bucket-schema/usage-cpu.json b/shared/text/bucket-schema/usage-cpu.json similarity index 100% rename from assets/text/bucket-schema/usage-cpu.json rename to shared/text/bucket-schema/usage-cpu.json diff --git a/assets/text/bucket-schema/usage-resources.csv b/shared/text/bucket-schema/usage-resources.csv similarity index 100% rename from assets/text/bucket-schema/usage-resources.csv rename to shared/text/bucket-schema/usage-resources.csv