Skip to content

Commit 31ec636

Browse files
authored
Merge branch 'master' into jmercer/plugin-sync-test
2 parents b2e9b2a + 08bc79f commit 31ec636

File tree

36 files changed

+2603
-727
lines changed

36 files changed

+2603
-727
lines changed

.ci/vale/styles/config/vocabularies/InfluxDataDocs/accept.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ LogicalPlan
3131
[Mm]onitor
3232
MBs?
3333
PBs?
34-
Parquet|\b\w*-*parquet-\w*\b|\b--\w*parquet\w*\b|`[^`]*parquet[^`]*`
34+
Parquet
35+
\w*-?\w*parquet\w*-\w*
3536
Redoc
3637
SQLAlchemy
3738
SQLAlchemy
@@ -41,9 +42,11 @@ System.Data.Odbc
4142
TBs?
4243
\bUI\b
4344
URL
45+
\w*-?\w*url\w*-\w*
4446
US (East|West|Central|North|South|Northeast|Northwest|Southeast|Southwest)
4547
Unix
4648
WALs?
49+
\w*-?wal-\w*
4750
Webpack
4851
[pP]y.*\b
4952
\b\w+_\w+\b
@@ -82,7 +85,6 @@ quoteChar
8285
retentionRules
8386
sourceBucket
8487
tagKey
85-
url[s]?
8688
v2
8789
v3
8890
venv

.husky/_/pre-commit

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,6 @@ call_lefthook()
3333
then
3434
"$dir/node_modules/lefthook/bin/index.js" "$@"
3535

36-
elif go tool lefthook -h >/dev/null 2>&1
37-
then
38-
go tool lefthook "$@"
3936
elif bundle exec lefthook -h >/dev/null 2>&1
4037
then
4138
bundle exec lefthook "$@"
@@ -45,21 +42,12 @@ call_lefthook()
4542
elif pnpm lefthook -h >/dev/null 2>&1
4643
then
4744
pnpm lefthook "$@"
48-
elif swift package lefthook >/dev/null 2>&1
45+
elif swift package plugin lefthook >/dev/null 2>&1
4946
then
50-
swift package --build-path .build/lefthook --disable-sandbox lefthook "$@"
47+
swift package --disable-sandbox plugin lefthook "$@"
5148
elif command -v mint >/dev/null 2>&1
5249
then
5350
mint run csjones/lefthook-plugin "$@"
54-
elif uv run lefthook -h >/dev/null 2>&1
55-
then
56-
uv run lefthook "$@"
57-
elif mise exec -- lefthook -h >/dev/null 2>&1
58-
then
59-
mise exec -- lefthook "$@"
60-
elif devbox run lefthook -h >/dev/null 2>&1
61-
then
62-
devbox run lefthook "$@"
6351
else
6452
echo "Can't find lefthook in PATH"
6553
fi

.husky/_/pre-push

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,6 @@ call_lefthook()
3333
then
3434
"$dir/node_modules/lefthook/bin/index.js" "$@"
3535

36-
elif go tool lefthook -h >/dev/null 2>&1
37-
then
38-
go tool lefthook "$@"
3936
elif bundle exec lefthook -h >/dev/null 2>&1
4037
then
4138
bundle exec lefthook "$@"
@@ -45,21 +42,12 @@ call_lefthook()
4542
elif pnpm lefthook -h >/dev/null 2>&1
4643
then
4744
pnpm lefthook "$@"
48-
elif swift package lefthook >/dev/null 2>&1
45+
elif swift package plugin lefthook >/dev/null 2>&1
4946
then
50-
swift package --build-path .build/lefthook --disable-sandbox lefthook "$@"
47+
swift package --disable-sandbox plugin lefthook "$@"
5148
elif command -v mint >/dev/null 2>&1
5249
then
5350
mint run csjones/lefthook-plugin "$@"
54-
elif uv run lefthook -h >/dev/null 2>&1
55-
then
56-
uv run lefthook "$@"
57-
elif mise exec -- lefthook -h >/dev/null 2>&1
58-
then
59-
mise exec -- lefthook "$@"
60-
elif devbox run lefthook -h >/dev/null 2>&1
61-
then
62-
devbox run lefthook "$@"
6351
else
6452
echo "Can't find lefthook in PATH"
6553
fi

.husky/_/prepare-commit-msg

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,6 @@ call_lefthook()
3333
then
3434
"$dir/node_modules/lefthook/bin/index.js" "$@"
3535

36-
elif go tool lefthook -h >/dev/null 2>&1
37-
then
38-
go tool lefthook "$@"
3936
elif bundle exec lefthook -h >/dev/null 2>&1
4037
then
4138
bundle exec lefthook "$@"
@@ -45,21 +42,12 @@ call_lefthook()
4542
elif pnpm lefthook -h >/dev/null 2>&1
4643
then
4744
pnpm lefthook "$@"
48-
elif swift package lefthook >/dev/null 2>&1
45+
elif swift package plugin lefthook >/dev/null 2>&1
4946
then
50-
swift package --build-path .build/lefthook --disable-sandbox lefthook "$@"
47+
swift package --disable-sandbox plugin lefthook "$@"
5148
elif command -v mint >/dev/null 2>&1
5249
then
5350
mint run csjones/lefthook-plugin "$@"
54-
elif uv run lefthook -h >/dev/null 2>&1
55-
then
56-
uv run lefthook "$@"
57-
elif mise exec -- lefthook -h >/dev/null 2>&1
58-
then
59-
mise exec -- lefthook "$@"
60-
elif devbox run lefthook -h >/dev/null 2>&1
61-
then
62-
devbox run lefthook "$@"
6351
else
6452
echo "Can't find lefthook in PATH"
6553
fi

DOCS-SHORTCODES.md

Lines changed: 90 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Complete reference for custom Hugo shortcodes used in InfluxData documentation.
1919
- [Content Management](#content-management)
2020
- [Special Purpose](#special-purpose)
2121

22-
---
22+
***
2323

2424
## Notes and Warnings
2525

@@ -146,7 +146,7 @@ Use the `{{< api-endpoint >}}` shortcode to generate a code block that contains
146146
- **method**: HTTP request method (get, post, patch, put, or delete)
147147
- **endpoint**: API endpoint
148148
- **api-ref**: Link the endpoint to a specific place in the API documentation
149-
- **influxdb_host**: Specify which InfluxDB product host to use _if the `endpoint` contains the `influxdb/host` shortcode_. Uses the current InfluxDB product as default. Supports the following product values:
149+
- **influxdb_host**: Specify which InfluxDB product host to use *if the `endpoint` contains the `influxdb/host` shortcode*. Uses the current InfluxDB product as default. Supports the following product values:
150150
- oss
151151
- cloud
152152
- serverless
@@ -268,11 +268,11 @@ To link to tabbed content, click on the tab and use the URL parameter shown. It
268268

269269
Use the `{{< page-nav >}}` shortcode to add page navigation buttons to a page. These are useful for guiding users through a set of docs that should be read in sequential order. The shortcode has the following parameters:
270270

271-
- **prev:** path of the previous document _(optional)_
272-
- **next:** path of the next document _(optional)_
273-
- **prevText:** override the button text linking to the previous document _(optional)_
274-
- **nextText:** override the button text linking to the next document _(optional)_
275-
- **keepTab:** include the currently selected tab in the button link _(optional)_
271+
- **prev:** path of the previous document *(optional)*
272+
- **next:** path of the next document *(optional)*
273+
- **prevText:** override the button text linking to the previous document *(optional)*
274+
- **nextText:** override the button text linking to the next document *(optional)*
275+
- **keepTab:** include the currently selected tab in the button link *(optional)*
276276

277277
The shortcode generates buttons that link to both the previous and next documents. By default, the shortcode uses either the `list_title` or the `title` of the linked document, but you can use `prevText` and `nextText` to override button text.
278278

@@ -308,7 +308,7 @@ The children shortcode can also be used to list only "section" articles (those w
308308
{{< children show="pages" >}}
309309
```
310310

311-
_By default, it displays both sections and pages._
311+
*By default, it displays both sections and pages.*
312312

313313
Use the `type` argument to specify the format of the children list.
314314

@@ -325,15 +325,15 @@ The following list types are available:
325325

326326
#### Include a "Read more" link
327327

328-
To include a "Read more" link with each child summary, set `readmore=true`. _Only the `articles` list type supports "Read more" links._
328+
To include a "Read more" link with each child summary, set `readmore=true`. *Only the `articles` list type supports "Read more" links.*
329329

330330
```md
331331
{{< children readmore=true >}}
332332
```
333333

334334
#### Include a horizontal rule
335335

336-
To include a horizontal rule after each child summary, set `hr=true`. _Only the `articles` list type supports horizontal rules._
336+
To include a horizontal rule after each child summary, set `hr=true`. *Only the `articles` list type supports horizontal rules.*
337337

338338
```md
339339
{{< children hr=true >}}
@@ -390,11 +390,11 @@ This is useful for maintaining and referencing sample code variants in their nat
390390

391391
#### Include specific files from the same directory
392392

393-
> [!Caution]
393+
> \[!Caution]
394394
> **Don't use for code examples**
395395
> Using this and `get-shared-text` shortcodes to include code examples prevents the code from being tested.
396396

397-
To include the text from one file in another file in the same directory, use the `{{< get-leaf-text >}}` shortcode. The directory that contains both files must be a Hugo [_Leaf Bundle_](https://gohugo.io/content-management/page-bundles/#leaf-bundles), a directory that doesn't have any child directories.
397+
To include the text from one file in another file in the same directory, use the `{{< get-leaf-text >}}` shortcode. The directory that contains both files must be a Hugo [*Leaf Bundle*](https://gohugo.io/content-management/page-bundles/#leaf-bundles), a directory that doesn't have any child directories.
398398

399399
In the following example, `api` is a leaf bundle. `content` isn't.
400400

@@ -447,13 +447,13 @@ Each children list `type` uses frontmatter properties when generating the list o
447447

448448
| Frontmatter | articles | list | functions |
449449
| :------------------- | :------: | :--: | :-------: |
450-
| `list_title` | ✓ | | ✓ |
451-
| `description` | | | |
452-
| `external_url` | ✓ | | |
453-
| `list_image` | | | |
454-
| `list_note` | | | |
455-
| `list_code_example` | | | |
456-
| `list_query_example` | | | |
450+
| `list_title` | ✓ | | ✓ |
451+
| `description` | | | |
452+
| `external_url` | ✓ | | |
453+
| `list_image` | | | |
454+
| `list_note` | | | |
455+
| `list_code_example` | | | |
456+
| `list_query_example` | | | |
457457

458458
## Visual Elements
459459

@@ -695,7 +695,7 @@ Column 2
695695

696696
The following options are available:
697697

698-
- half _(Default)_
698+
- half *(Default)*
699699
- third
700700
- quarter
701701

@@ -721,10 +721,10 @@ Click {{< caps >}}Add Data{{< /caps >}}
721721

722722
### Authentication token link
723723

724-
Use the `{{% token-link "<descriptor>" "<link_append>%}}` shortcode to automatically generate links to token management documentation. The shortcode accepts two _optional_ arguments:
724+
Use the `{{% token-link "<descriptor>" "<link_append>%}}` shortcode to automatically generate links to token management documentation. The shortcode accepts two *optional* arguments:
725725

726726
- **descriptor**: An optional token descriptor
727-
- **link_append**: An optional path to append to the token management link path, `/<product>/<version>/admin/tokens/`.
727+
- **link\_append**: An optional path to append to the token management link path, `/<product>/<version>/admin/tokens/`.
728728

729729
```md
730730
{{% token-link "database" "resource/" %}}
@@ -775,7 +775,7 @@ Descriptions should follow consistent patterns:
775775
- Recommended: "your {{% token-link "database" %}}"{{% show-in "enterprise" %}} with permissions on the specified database{{% /show-in %}}
776776
- Avoid: "your token", "the token", "an authorization token"
777777
3. **Database names**:
778-
- Recommended: "the name of the database to [action]"
778+
- Recommended: "the name of the database to \[action]"
779779
- Avoid: "your database", "the database name"
780780
4. **Conditional content**:
781781
- Use `{{% show-in "enterprise" %}}` for content specific to enterprise versions
@@ -797,13 +797,75 @@ Descriptions should follow consistent patterns:
797797

798798
#### Syntax
799799

800-
- `{ placeholders="PATTERN1|PATTERN2" }`: Use this code block attribute to define placeholder patterns
800+
- `{ placeholders="PATTERN1|PATTERN2" }`: Use this code block attribute to define placeholder patterns
801801
- `{{% code-placeholder-key %}}`: Use this shortcode to define a placeholder key
802802
- `{{% /code-placeholder-key %}}`: Use this shortcode to close the key name
803803

804-
_The `placeholders` attribute supercedes the deprecated `code-placeholders` shortcode._
804+
*The `placeholders` attribute supercedes the deprecated `code-placeholders` shortcode.*
805+
806+
#### Automated placeholder syntax
807+
808+
Use the `docs placeholders` command to automatically add placeholder syntax to code blocks and descriptions:
809+
810+
```bash
811+
# Process a file
812+
npx docs placeholders content/influxdb3/core/admin/upgrade.md
813+
814+
# Preview changes without modifying the file
815+
npx docs placeholders content/influxdb3/core/admin/upgrade.md --dry
816+
817+
# Get help
818+
npx docs placeholders --help
819+
```
820+
821+
**What it does:**
822+
823+
1. Detects UPPERCASE placeholders in code blocks
824+
2. Adds `{ placeholders="..." }` attribute to code fences
825+
3. Wraps placeholder descriptions with `{{% code-placeholder-key %}}` shortcodes
826+
827+
**Example transformation:**
828+
829+
Before:
830+
831+
````markdown
832+
```bash
833+
influxdb3 query \
834+
--database SYSTEM_DATABASE \
835+
--token ADMIN_TOKEN \
836+
"SELECT * FROM system.version"
837+
```
838+
839+
Replace the following:
840+
841+
- **`SYSTEM_DATABASE`**: The name of your system database
842+
- **`ADMIN_TOKEN`**: An admin token with read permissions
843+
````
844+
845+
After:
846+
847+
````markdown
848+
```bash { placeholders="ADMIN_TOKEN|SYSTEM_DATABASE" }
849+
influxdb3 query \
850+
--database SYSTEM_DATABASE \
851+
--token ADMIN_TOKEN \
852+
"SELECT * FROM system.version"
853+
```
854+
855+
Replace the following:
856+
857+
- {{% code-placeholder-key %}}`SYSTEM_DATABASE`{{% /code-placeholder-key %}}: The name of your system database
858+
- {{% code-placeholder-key %}}`ADMIN_TOKEN`{{% /code-placeholder-key %}}: An admin token with read permissions
859+
````
860+
861+
**How it works:**
862+
863+
- Pattern: Matches words with 2+ characters, all uppercase, can include underscores
864+
- Excludes common words: HTTP verbs (GET, POST), protocols (HTTP, HTTPS), SQL keywords (SELECT, FROM), etc.
865+
- Idempotent: Running multiple times won't duplicate syntax
866+
- Preserves existing `placeholders` attributes and already-wrapped descriptions
805867

806-
#### Example usage
868+
#### Manual placeholder usage
807869

808870
```sh { placeholders "DATABASE_NAME|USERNAME|PASSWORD_OR_TOKEN|API_TOKEN|[email protected]" }
809871
curl --request POST http://localhost:8086/write?db=DATABASE_NAME \
@@ -839,7 +901,7 @@ Sample dataset to output. Use either `set` argument name or provide the set as t
839901

840902
#### includeNull
841903

842-
Specify whether or not to include _null_ values in the dataset. Use either `includeNull` argument name or provide the boolean value as the second argument.
904+
Specify whether or not to include *null* values in the dataset. Use either `includeNull` argument name or provide the boolean value as the second argument.
843905

844906
#### includeRange
845907

@@ -1115,6 +1177,6 @@ The InfluxDB host placeholder that gets replaced by custom domains differs betwe
11151177
{{< influxdb/host "serverless" >}}
11161178
```
11171179
1118-
---
1180+
***
11191181
11201182
**For working examples**: Test all shortcodes in [content/example.md](content/example.md)

0 commit comments

Comments
 (0)