diff --git a/apps/docs/src/components/webkit/CodeBlock.vue b/apps/docs/src/components/webkit/CodeBlock.vue index 809ede95a8..62499881eb 100644 --- a/apps/docs/src/components/webkit/CodeBlock.vue +++ b/apps/docs/src/components/webkit/CodeBlock.vue @@ -21,6 +21,7 @@ const LABELS: Record = { ts: 'TypeScript', typescript: 'TypeScript', json: 'JSON', + jsonl: 'JSON Lines', hcl: 'HCL', graphql: 'GraphQL', yaml: 'YAML', diff --git a/apps/docs/src/content/docs/en/pages/style-guide/components.mdx b/apps/docs/src/content/docs/en/pages/style-guide/components.mdx index dfae7089e4..bfaa8695ce 100644 --- a/apps/docs/src/content/docs/en/pages/style-guide/components.mdx +++ b/apps/docs/src/content/docs/en/pages/style-guide/components.mdx @@ -73,7 +73,7 @@ import Code from '~/components/webkit/CodeBlock.vue' Fenced blocks are also house style. Use a fence for output the reader reads, and `` for input the reader copies. -Language tags in use: `bash`, `sh`, `json`, `javascript`, `js`, `typescript`, `ts`, `hcl`, `graphql`, `shell`, `text`, `plaintext`. Terraform is `hcl`, not `terraform`. +Language tags in use: `bash`, `sh`, `json`, `jsonl`, `javascript`, `js`, `typescript`, `ts`, `hcl`, `graphql`, `shell`, `text`, `plaintext`. Terraform is `hcl`, not `terraform`. JSON Lines, one JSON value per line, is `jsonl`, not `json`. --- diff --git a/apps/docs/src/content/docs/en/pages/style-guide/formatting/code.mdx b/apps/docs/src/content/docs/en/pages/style-guide/formatting/code.mdx index dbe18319b6..32d39529ec 100644 --- a/apps/docs/src/content/docs/en/pages/style-guide/formatting/code.mdx +++ b/apps/docs/src/content/docs/en/pages/style-guide/formatting/code.mdx @@ -62,9 +62,11 @@ Show JSON indented with two spaces, one key per line, never on a single line. A Two outputs keep their single line, because the line is what the reader compares or searches for: a row of a table that a command prints, such as `Modules: {...}` in a `describe` output, and an error message that ends in a JSON list, such as `Error: failed to create the Firewall Rule: ["..."]`. +JSON Lines keeps one value per line by definition. A body or a file that carries one JSON value per line, such as an NDJSON request body, takes the `jsonl` tag, and each value stays on its own line. + ## Tag the language, and name a file only when there is one -The language tag on a fence drives the highlighting and names the language in the bar above any block of two or more lines: `bash` reads `Shell`, `json` reads `JSON`. Give every fence a tag, and `text` to output that has no language. A one-line block shows no line numbers, and no bar unless it has a `title`. +The language tag on a fence drives the highlighting and names the language in the bar above any block of two or more lines: `bash` reads `Shell`, `json` reads `JSON`, `jsonl` reads `JSON Lines`. Give every fence a tag, and `text` to output that has no language. A one-line block shows no line numbers, and no bar unless it has a `title`. Add `title="..."` only when the block is a file the reader saves, such as `title="azion.config.js"`. The file name takes the language's place in the bar. The props are in [Components](/en/documentation/style-guide/components/).