Skip to content

Commit 559cc5b

Browse files
committed
Merge branch 'main' of https://github.com/ClickHouse/clickhouse-docs into Blargian-patch-940827
2 parents e364b1d + 80169be commit 559cc5b

File tree

698 files changed

+28206
-3652
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

698 files changed

+28206
-3652
lines changed

.github/workflows/badges-notify.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313

1414
steps:
1515
- name: Checkout repository
16-
uses: actions/checkout@v4
16+
uses: actions/checkout@v5
1717

1818
- name: Make script executable
1919
run: chmod +x scripts/badger.sh

.github/workflows/build-search.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ jobs:
2020

2121
steps:
2222
- name: Checkout Repository
23-
uses: actions/checkout@v4
23+
uses: actions/checkout@v5
2424

2525
- name: Set up Node.js
26-
uses: actions/setup-node@v4
26+
uses: actions/setup-node@v6
2727
with:
2828
node-version: '20'
2929

.github/workflows/check-build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
check_type: [spellcheck, kbcheck, md-lint, glossary-check]
2020
steps:
2121
# Add setup steps per check here
22-
- uses: actions/checkout@v4
22+
- uses: actions/checkout@v5
2323
- name: Install Aspell
2424
if: matrix.check_type == 'spellcheck'
2525
run: sudo apt-get update && sudo apt-get install -y aspell aspell-en
@@ -31,7 +31,7 @@ jobs:
3131
uv python install 3.12 --verbose
3232
- name: Setup md-lint environment
3333
if: matrix.check_type == 'md-lint'
34-
uses: actions/setup-node@v3
34+
uses: actions/setup-node@v6
3535
with:
3636
node-version: 20
3737
- name: Install markdownlint-cli2

.github/workflows/pull-request.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ jobs:
2121
runs-on: ubuntu-latest
2222
steps:
2323
- name: Checkout repository
24-
uses: actions/checkout@v3
24+
uses: actions/checkout@v5
2525

2626
- name: Set up Node.js
27-
uses: actions/setup-node@v3
27+
uses: actions/setup-node@v6
2828
with:
2929
node-version: '20' # Adjust Node.js version as needed
3030
cache: 'yarn' # Cache yarn dependencies

.github/workflows/trademark-cla-approval.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ jobs:
170170
171171
- name: Check out repository
172172
if: success() && steps.process-comment.outputs.pr_number != ''
173-
uses: actions/checkout@v4
173+
uses: actions/checkout@v5
174174
with:
175175
fetch-depth: 0
176176
# For forked PRs, we need to fetch from the fork and checkout the SHA

.github/workflows/trademark-cla-notice.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
private-key: "${{ secrets.WORKFLOW_AUTH_PUBLIC_PRIVATE_KEY }}"
2626

2727
- name: Check out code
28-
uses: actions/checkout@v4
28+
uses: actions/checkout@v5
2929
with:
3030
fetch-depth: 0
3131
# Use the GitHub App token if available, otherwise fallback to GITHUB_TOKEN

.github/workflows/vale-linter.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
timeout-minutes: 10
2121
steps:
2222
- name: Checkout repository
23-
uses: actions/checkout@v3
23+
uses: actions/checkout@v5
2424
with:
2525
fetch-depth: 0
2626
path: .

contribute/style-guide.md

Lines changed: 51 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,53 @@ which may need versioned documentation, we use the following custom
331331
<ClientVersionDropdown versions={}/>
332332
```
333333

334-
### How to use it
334+
### How to use it
335+
336+
The `ClientVersionDropdown` component supports two APIs:
337+
338+
#### API 1: Inline Content (Recommended)
339+
340+
This approach keeps all content in the main file, which allows Docusaurus to properly generate the table of contents (TOC) for all versions.
341+
342+
```js
343+
import ClientVersionDropdown from '@theme/ClientVersionDropdown/ClientVersionDropdown'
344+
import Version from '@theme/ClientVersionDropdown/Version'
345+
346+
<ClientVersionDropdown versions={[
347+
{
348+
'version': 'v0.8+'
349+
},
350+
{
351+
'version': 'v0.7.x'
352+
}
353+
]}>
354+
355+
<Version>
356+
## Environment requirements
357+
358+
Your v0.8+ content here...
359+
</Version>
360+
361+
<Version>
362+
## Environment requirements {#v07-environment-requirements}
363+
364+
Your v0.7.x content here...
365+
</Version>
366+
367+
</ClientVersionDropdown>
368+
```
369+
370+
**Important Notes:**
371+
- All content is placed directly in the main `.mdx` file
372+
- Each `<Version>` block contains the content for one version
373+
- The order of `<Version>` blocks must match the order in the `versions` array
374+
- **Make header IDs unique** across versions using explicit anchor IDs (e.g., `{#v07-environment-requirements}`)
375+
- The TOC will show only headers from the currently selected version
376+
- The component will display the first version as 'selected' by default
377+
378+
#### API 2: External Snippets (Legacy)
379+
380+
This approach uses separate snippet files for each version. Note that this method has limitations with TOC generation.
335381

336382
Versioned folders are structured as follows:
337383

@@ -352,9 +398,9 @@ Versioned folders are structured as follows:
352398
```
353399

354400
* The content for each version is placed in a snippet. For example `_v0_7.mdx`
355-
* Snippets begin with `_`
401+
* Snippets begin with `_`
356402
* Snippets do not contain front-matter
357-
* These snippets import any components they may need (See `_v0_7.mdx` for example)
403+
* These snippets import any components they may need
358404
* They should be .mdx files
359405
* There is a single page for all versions. For example `client.mdx`
360406
* This page contains frontmatter
@@ -370,8 +416,8 @@ import ClientVersionDropdown from '@theme/ClientVersionDropdown/ClientVersionDro
370416
Also import the two snippets:
371417

372418
```js
373-
import v07 from './_v0_7.mdx'
374-
import v08 from './_v0_8.mdx'
419+
import v07 from './_snippets/_v0_7.mdx'
420+
import v08 from './_snippets/_v0_8.mdx'
375421
```
376422

377423
Pass it an array of objects representing versions and their respective snippets:

docs/_placeholders/api/_invitations-api-reference.md

Lines changed: 0 additions & 10 deletions
This file was deleted.

docs/_placeholders/api/_keys-api-reference.md

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)