Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .agents/instructions/content-review.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ Products defined in [data/products.yml](../../data/products.yml):
## Code Blocks

- Use `python` not `py` for language identifiers (pytest requirement)
- Use `lp` for line protocol examples. `lp` fences are blocking syntax checks;
use `{lint="false"}` only for examples that intentionally show invalid input.
- Long options in CLI examples (`--output` not `-o`)
- Keep lines within 80 characters
- Include language identifier on fenced code blocks
Expand Down
8 changes: 8 additions & 0 deletions .agents/instructions/content.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,14 @@ yarn test:codeblocks:all
For comprehensive testing workflows, see
[content-editing skill](../skills/content-editing/SKILL.md).

### Line protocol fences

Use `lp` for InfluxDB line protocol examples.
The code-block linter validates `lp` fences and blocks malformed syntax in CI.
Qualified field keys use `family::field`; only the first `::` identifies the
family delimiter, so later `::` sequences remain part of the field name.
For an intentionally invalid example, add `{lint="false"}` to the fence.

## Style Guidelines

- Use semantic line feeds (one sentence per line)
Expand Down
7 changes: 7 additions & 0 deletions .agents/instructions/layouts.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,13 @@ Add shortcode usage examples to `content/example.md` to verify:
See [DOCS-SHORTCODES.md](../../DOCS-SHORTCODES.md) for complete shortcode
documentation.

### Line protocol render hook

`layouts/_default/_markup/render-codeblock-lp.html` renders `lp` code fences.
Keep its output Chroma-compatible (`.highlight > pre.chroma > code.language-lp`)
and HTML-escape source text before marking generated markup safe.
For malformed source, render escaped plain text rather than partial highlighting.

## Related Resources

- **Complete Hugo template workflow**:
Expand Down
2 changes: 1 addition & 1 deletion .agents/skills/content-editing/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ yarn test:lint-codeblocks

| Language | On failure |
| ------------------------ | ---------------------------------- |
| JSON, YAML, TOML | `::error::` — fails the PR check |
| JSON, YAML, TOML, LP | `::error::` — fails the PR check |
| bash, python, javascript | `::warning::` — informational only |

**Normalization:** declared `placeholders="TOKEN|DURATION"` fence attributes and Hugo shortcodes (`{{< >}}`, `{{% %}}`) are substituted before parsing. See `DOCS-TESTING.md § "Parse/compile code-block lint"` for details.
Expand Down
35 changes: 20 additions & 15 deletions .agents/skills/docs-testing/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,20 +58,20 @@ Code block execution tests are **disabled** in pre-push hooks. Run them manually

### CI checks on every PR

| Workflow | What it checks | Blocks merge? |
| -------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------- |
| `pr-vale-check.yml` | Vale on changed markdown + shared content | Errors only |
| `pr-link-check.yml` | Links in changed pages (also download/install pages when `data/products.yml` changes) | Warnings only |
| `pr-release-check.yml` | Reminds to bump `data/products.yml` when release notes advance; on a version bump, reminds to confirm download artifacts are published | No (reminders only) |
| `test.yml` (lint-codeblocks job) | Parse/compile check on changed content | JSON/YAML/TOML errors only |
| `pr-render-check.yml` | Whitespace-escaped code blocks, Cypress render | Yes (render artifacts) |
| `pr-remark-check.yml` | Remark lint on repo docs | No |
| `pr-ai-artifacts-check.yml` | Markdown twins, llms-full corpora, JSON-LD `@id` references (full site build) | Yes |
| `block-ephemeral-docs.yml` | Blocks PLAN.md and HANDOVER.md on master | Yes |
| `pr-feedback-links.yml` | Rendered feedback link validation | Warnings only |
| `pr-lockfile-lint.yml` | yarn.lock integrity | Yes |
| `auto-label.yml` | Applies product labels | No |
| `pr-preview.yml` | Deploys a full-site preview to staging S3 | No |
| Workflow | What it checks | Blocks merge? |
| -------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------- |
| `pr-vale-check.yml` | Vale on changed markdown + shared content | Errors only |
| `pr-link-check.yml` | Links in changed pages (also download/install pages when `data/products.yml` changes) | Warnings only |
| `pr-release-check.yml` | Reminds to bump `data/products.yml` when release notes advance; on a version bump, reminds to confirm download artifacts are published | No (reminders only) |
| `test.yml` (lint-codeblocks job) | Parse/compile check on changed content | JSON/YAML/TOML/LP errors fail |
| `pr-render-check.yml` | Whitespace-escaped code blocks, Cypress render | Yes (render artifacts) |
| `pr-remark-check.yml` | Remark lint on repo docs | No |
| `pr-ai-artifacts-check.yml` | Markdown twins, llms-full corpora, JSON-LD `@id` references (full site build) | Yes |
| `block-ephemeral-docs.yml` | Blocks PLAN.md and HANDOVER.md on master | Yes |
| `pr-feedback-links.yml` | Rendered feedback link validation | Warnings only |
| `pr-lockfile-lint.yml` | yarn.lock integrity | Yes |
| `auto-label.yml` | Applies product labels | No |
| `pr-preview.yml` | Deploys a full-site preview to staging S3 | No |

Code block **execution** is NOT a PR check. It runs on demand via `workflow_dispatch`.

Expand Down Expand Up @@ -107,7 +107,12 @@ yarn lint-codeblocks:pretty content/**/*.md
yarn test:lint-codeblocks
```

Exit code 1 if any JSON/YAML/TOML block fails to parse. bash/python/JS failures are warnings only.
Exit code 1 if any JSON/YAML/TOML/LP block fails to parse.
bash/python/JS failures are warnings only.

`lp` validates InfluxDB line protocol, including qualified field keys such as
`family::field`.
Use `{lint="false"}` only for intentionally invalid examples.

Linter normalizes `{ placeholders="..." }` fence attributes and strips Hugo shortcodes inside fences before parsing.

Expand Down
2 changes: 2 additions & 0 deletions .claude/rules/content-review.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ Products defined in [data/products.yml](../../data/products.yml):
## Code Blocks

- Use `python` not `py` for language identifiers (pytest requirement)
- Use `lp` for line protocol examples. `lp` fences are blocking syntax checks;
use `{lint="false"}` only for examples that intentionally show invalid input.
- Long options in CLI examples (`--output` not `-o`)
- Keep lines within 80 characters
- Include language identifier on fenced code blocks
Expand Down
8 changes: 8 additions & 0 deletions .claude/rules/content.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,14 @@ yarn test:codeblocks:all
For comprehensive testing workflows, see
[content-editing skill](../../.agents/skills/content-editing/SKILL.md).

### Line protocol fences

Use `lp` for InfluxDB line protocol examples.
The code-block linter validates `lp` fences and blocks malformed syntax in CI.
Qualified field keys use `family::field`; only the first `::` identifies the
family delimiter, so later `::` sequences remain part of the field name.
For an intentionally invalid example, add `{lint="false"}` to the fence.

## Style Guidelines

- Use semantic line feeds (one sentence per line)
Expand Down
7 changes: 7 additions & 0 deletions .claude/rules/layouts.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,13 @@ Add shortcode usage examples to `content/example.md` to verify:
See [DOCS-SHORTCODES.md](../../DOCS-SHORTCODES.md) for complete shortcode
documentation.

### Line protocol render hook

`layouts/_default/_markup/render-codeblock-lp.html` renders `lp` code fences.
Keep its output Chroma-compatible (`.highlight > pre.chroma > code.language-lp`)
and HTML-escape source text before marking generated markup safe.
For malformed source, render escaped plain text rather than partial highlighting.

## Related Resources

- **Complete Hugo template workflow**:
Expand Down
2 changes: 2 additions & 0 deletions .github/instructions/content-review.instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ Products defined in [data/products.yml](../../data/products.yml):
## Code Blocks

- Use `python` not `py` for language identifiers (pytest requirement)
- Use `lp` for line protocol examples. `lp` fences are blocking syntax checks;
use `{lint="false"}` only for examples that intentionally show invalid input.
- Long options in CLI examples (`--output` not `-o`)
- Keep lines within 80 characters
- Include language identifier on fenced code blocks
Expand Down
8 changes: 8 additions & 0 deletions .github/instructions/content.instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,14 @@ yarn test:codeblocks:all
For comprehensive testing workflows, see
[content-editing skill](../../.agents/skills/content-editing/SKILL.md).

### Line protocol fences

Use `lp` for InfluxDB line protocol examples.
The code-block linter validates `lp` fences and blocks malformed syntax in CI.
Qualified field keys use `family::field`; only the first `::` identifies the
family delimiter, so later `::` sequences remain part of the field name.
For an intentionally invalid example, add `{lint="false"}` to the fence.

## Style Guidelines

- Use semantic line feeds (one sentence per line)
Expand Down
7 changes: 7 additions & 0 deletions .github/instructions/layouts.instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,13 @@ Add shortcode usage examples to `content/example.md` to verify:
See [DOCS-SHORTCODES.md](../../DOCS-SHORTCODES.md) for complete shortcode
documentation.

### Line protocol render hook

`layouts/_default/_markup/render-codeblock-lp.html` renders `lp` code fences.
Keep its output Chroma-compatible (`.highlight > pre.chroma > code.language-lp`)
and HTML-escape source text before marking generated markup safe.
For malformed source, render escaped plain text rather than partial highlighting.

## Related Resources

- **Complete Hugo template workflow**:
Expand Down
8 changes: 7 additions & 1 deletion DOCS-TESTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,17 @@ yarn test:lint-codeblocks

| Language | Policy on parse failure |
| ------------------------ | ------------------------------------------ |
| JSON, YAML, TOML | `::error::` — fails the PR check |
| JSON, YAML, TOML, LP | `::error::` — fails the PR check |
| bash, python, javascript | `::warning::` — does not fail the PR check |

SQL, InfluxQL, Go, and other languages are not yet checked.

`lp` fences validate InfluxDB line protocol, including qualified field keys such
as `family::field`.
The validator accepts a single family delimiter and treats later `::` sequences
as part of the field name.
Use `{lint="false"}` for intentionally invalid line protocol examples.

**Normalization**: The linter handles common docs patterns:

- `{ placeholders="TOKEN_NAME|DURATION" }` fence attributes — tokens get language-safe substitutions before parsing
Expand Down
10 changes: 10 additions & 0 deletions content/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

## Content File Guidelines

**Frontmatter reference**: [DOCS-FRONTMATTER.md](../DOCS-FRONTMATTER.md)

Check warning on line 11 in content/AGENTS.md

View workflow job for this annotation

GitHub Actions / Vale style check

Google.Colons

': D' should be in lowercase.
**Shortcodes reference**: [DOCS-SHORTCODES.md](../DOCS-SHORTCODES.md)

Check warning on line 12 in content/AGENTS.md

View workflow job for this annotation

GitHub Actions / Vale style check

Google.Colons

': D' should be in lowercase.

Check warning on line 12 in content/AGENTS.md

View workflow job for this annotation

GitHub Actions / Vale style check

InfluxDataDocs.Spelling

Did you really mean 'Shortcodes'?
**Working examples**: [content/example.md](./example.md)

**For complete content editing workflow**, see
Expand Down Expand Up @@ -68,7 +68,7 @@

#### Other CLI Commands

```bash

Check notice on line 71 in content/AGENTS.md

View workflow job for this annotation

GitHub Actions / Lint code blocks

normalized before parse: angle-bracket placeholder strip
# Add placeholder syntax to code blocks
docs placeholders <file.md>

Expand Down Expand Up @@ -123,6 +123,14 @@
For comprehensive testing workflows, see
[content-editing skill](../.agents/skills/content-editing/SKILL.md).

#### Line protocol fences

Use `lp` for InfluxDB line protocol examples.
The code-block linter validates `lp` fences and blocks malformed syntax in CI.
Qualified field keys use `family::field`; only the first `::` identifies the
family delimiter, so later `::` sequences remain part of the field name.
For an intentionally invalid example, add `{lint="false"}` to the fence.

### Style Guidelines

- Use semantic line feeds (one sentence per line)
Expand Down Expand Up @@ -262,6 +270,8 @@
### Code Blocks

- Use `python` not `py` for language identifiers (pytest requirement)
- Use `lp` for line protocol examples. `lp` fences are blocking syntax checks;
use `{lint="false"}` only for examples that intentionally show invalid input.
- Long options in CLI examples (`--output` not `-o`)
- Keep lines within 80 characters
- Include language identifier on fenced code blocks
Expand All @@ -278,5 +288,5 @@
frontmatter, malformed shortcodes, h1 in content body
- **WARNING**: Missing semantic line feeds, skipped heading levels, missing
`weight`, long CLI options not used
- **INFO**: Suggestions, code block missing language identifier, opportunities

Check warning on line 291 in content/AGENTS.md

View workflow job for this annotation

GitHub Actions / Vale style check

Google.Colons

': S' should be in lowercase.
to use shared content
7 changes: 4 additions & 3 deletions content/enterprise_influxdb/v1/guides/write_data.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,12 @@ The InfluxDB API is the primary means of writing data into InfluxDB.

The preceding examples use a curl `--data-<format>` option to include a POST request body that contains [InfluxDB line protocol](/enterprise_influxdb/v1/concepts/glossary/#influxdb-line-protocol) for the time series data that you want to store.

```js
// Syntax
```text
# Syntax
<measurement>[,<tag_key>=<tag_value>[,<tag_key>=<tag_value>]] <field_key>=<field_value>[,<field_key>=<field_value>] [<timestamp>]
```

// Example
```lp
cpu_load_short,host=server01,region=us-west value=0.64 1434055562000000000
```

Expand Down
16 changes: 16 additions & 0 deletions content/example.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,22 @@ This is a paragraph. Lorem ipsum dolor ({{< icon "trash" "v2" >}}) sit amet, con

This is **bold** text. This is *italic* text. This is ***bold and italic***.

### Line protocol fence

```lp
# A comment remains source text.
cpu,host=west usage=42.5,active=true 1700000000000000000
cpu cpu::user=12.5,cpu::system=2.5,mem::used=1.2,plain=3.4
table a::b::c="quoted-value",status="ready"
東京,tag=値 field="Unicode-value"
```

The malformed fence falls back to escaped plain text instead of partial markup:

```lp {lint="false"}
cpu field="unterminated
```

### Clockface v2 icons

{{< nav-icon "account" "v2" >}}
Expand Down
25 changes: 13 additions & 12 deletions content/shared/influxdb-v2/reference/syntax/line-protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@ It is a text-based format that provides the measurement, tag set, field set, and
- [Naming restrictions](#naming-restrictions)
- [Duplicate points](#duplicate-points)

```js
// Syntax
```text
# Syntax
<measurement>[,<tag_key>=<tag_value>[,<tag_key>=<tag_value>]] <field_key>=<field_value>[,<field_key>=<field_value>] [<timestamp>]
```

// Example
```lp
myMeasurement,tag1=value1,tag2=value2 fieldKey="fieldValue" 1556813561098000000
```

Expand Down Expand Up @@ -63,7 +64,7 @@ _**Value data type:** [Float](#float) | [Integer](#integer) | [UInteger](#uinteg
{{% note %}}
_Always double quote string field values. More on quotes [below](#quotes)._

```sh
```lp
measurementName fieldKey="field string value" 1556813561098000000
```
{{% /note %}}
Expand Down Expand Up @@ -99,7 +100,7 @@ Default numerical type.
_InfluxDB supports scientific notation in float field values._

##### Float field value examples
```js
```lp
myMeasurement fieldKey=1.0
myMeasurement fieldKey=1
myMeasurement fieldKey=-1.234456e+78
Expand All @@ -114,7 +115,7 @@ Trailing `i` on the number specifies an integer.
| `-9223372036854775808i` | `9223372036854775807i` |

##### Integer field value examples
```js
```lp
myMeasurement fieldKey=1i
myMeasurement fieldKey=12485903i
myMeasurement fieldKey=-12485903i
Expand All @@ -129,7 +130,7 @@ Trailing `u` on the number specifies an unsigned integer.
| `0u` | `18446744073709551615u` |

##### UInteger field value examples
```js
```lp
myMeasurement fieldKey=1u
myMeasurement fieldKey=12485903u
```
Expand All @@ -139,7 +140,7 @@ Plain text string.
Length limit 64KB.

##### String example
```sh
```lp
# String measurement name, field key, and field value
myMeasurement fieldKey="this is a string"
```
Expand All @@ -153,7 +154,7 @@ Stores `true` or `false` values.
| False | `f`, `F`, `false`, `False`, `FALSE` |

##### Boolean field value examples
```js
```lp
myMeasurement fieldKey=true
myMeasurement fieldKey=false
myMeasurement fieldKey=t
Expand All @@ -176,7 +177,7 @@ Default precision is nanoseconds (`ns`).
| `-9223372036854775806` | `9223372036854775806` |

##### Unix timestamp example
```js
```lp
myMeasurementName fieldKey="fieldValue" 1556813561098000000
```

Expand Down Expand Up @@ -211,7 +212,7 @@ In the following contexts, it requires escaping certain characters with a backsl
You do not need to escape other special characters.

##### Examples of special characters in line protocol
```sh
```lp
# Measurement name with spaces
my\ Measurement fieldKey="string value"

Expand Down Expand Up @@ -243,7 +244,7 @@ For example:
Line protocol interprets `#` at the beginning of a line as a comment character
and ignores all subsequent characters until the next newline `\n`.

```sh
```lp
# This is a comment
myMeasurement fieldKey="string value" 1556813561098000000
```
Expand Down
Loading
Loading