Skip to content

Commit a64b41e

Browse files
committed
merge main into branch and solve conflicts
2 parents 14b9464 + 291ab08 commit a64b41e

File tree

10,991 files changed

+438981
-267288
lines changed

Some content is hidden

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

10,991 files changed

+438981
-267288
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
* @ClickHouse/docs
2-
/docs/integrations/data-ingestion/clickpipes/ @ClickHouse/clickpipes @ClickHouse/docs
32
/docs/integrations/ @ClickHouse/integrations-ecosystem @ClickHouse/docs
3+
/docs/integrations/data-ingestion/clickpipes/ @ClickHouse/clickpipes @ClickHouse/docs

.github/workflows/check-build.yml

Lines changed: 21 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ jobs:
1616
runs-on: ubuntu-latest
1717
strategy:
1818
matrix:
19-
check_type: [spellcheck, kbcheck, md-lint]
19+
check_type: [spellcheck, kbcheck, md-lint, glossary-check]
2020
steps:
2121
# Add setup steps per check here
2222
- uses: actions/checkout@v4
2323
- name: Install Aspell
2424
if: matrix.check_type == 'spellcheck'
2525
run: sudo apt-get update && sudo apt-get install -y aspell aspell-en
2626
- name: Set up Python
27-
if: matrix.check_type == 'kbcheck'
27+
if: matrix.check_type == 'kbcheck' || matrix.check_type == 'glossary-check'
2828
run: |
2929
curl -Ls https://astral.sh/uv/install.sh | sh
3030
uv clean
@@ -39,31 +39,25 @@ jobs:
3939
run: yarn add -D markdownlint-cli2
4040

4141
# Run the checks here
42-
- name: Run checks
43-
id: check_step
44-
run: |
45-
if [[ "${{ matrix.check_type }}" == "spellcheck" ]]; then
46-
yarn check-spelling
47-
exit_code=$?
48-
elif [[ "${{ matrix.check_type }}" == "kbcheck" ]]; then
49-
yarn check-kb
50-
exit_code=$?
51-
elif [[ "${{ matrix.check_type }}" == "md-lint" ]]; then
52-
yarn check-markdown
53-
exit_code=$?
54-
fi
55-
56-
if [[ $exit_code -ne 0 ]]; then
57-
echo "::error::${{ matrix.check_type }} check failed. See logs for details."
58-
exit 1
59-
fi
42+
- name: Run spellcheck
43+
if: matrix.check_type == 'spellcheck'
44+
run: yarn check-spelling
6045

61-
- name: Set check status
62-
if: steps.check_step.outcome != 'success'
63-
uses: actions/github-script@v6
64-
with:
65-
script: |
66-
core.setFailed('${{ matrix.check_type }} check failed.');
46+
- name: Run KB check
47+
if: matrix.check_type == 'kbcheck'
48+
run: yarn check-kb
49+
50+
- name: Run markdown lint
51+
if: matrix.check_type == 'md-lint'
52+
run: yarn check-markdown
53+
54+
- name: Run glossary check
55+
if: matrix.check_type == 'glossary-check'
56+
run: |
57+
echo "Extracting glossary from markdown..."
58+
python3 scripts/glossary/extract-glossary-terms.py
59+
echo "Checking glossary coverage..."
60+
python3 scripts/glossary/wrap-glossary-terms.py --check || echo "::warning::Glossary check found unwrapped terms (non-blocking)"
6761
6862
check_overall_status:
6963
needs: stylecheck
@@ -74,5 +68,4 @@ jobs:
7468
if: needs.stylecheck.result != 'success'
7569
run: |
7670
echo "::error::One or more checks of the style check failed."
77-
exit 1
78-
71+
exit 1

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- name: Generate Token
1616
id: generate-token
1717
continue-on-error: true
18-
uses: actions/create-github-app-token@v1
18+
uses: actions/create-github-app-token@v2
1919
with:
2020
app-id: "${{ secrets.WORKFLOW_AUTH_PUBLIC_APP_ID }}"
2121
private-key: "${{ secrets.WORKFLOW_AUTH_PUBLIC_PRIVATE_KEY }}"

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- name: Generate Token
2020
id: generate-token
2121
continue-on-error: true
22-
uses: actions/create-github-app-token@v1
22+
uses: actions/create-github-app-token@v2
2323
with:
2424
app-id: "${{ secrets.WORKFLOW_AUTH_PUBLIC_APP_ID }}"
2525
private-key: "${{ secrets.WORKFLOW_AUTH_PUBLIC_PRIVATE_KEY }}"

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,10 @@ You can run a copy of this website locally within a few steps. Some folks find t
8080
# [INFO] Use `npm run serve` command to test your build locally.
8181
# ✨ Done in 105.96s.
8282
```
83+
84+
> [!TIP]
85+
> If the build command is failing due to broken anchors,
86+
> it is possible to ignore these temporarily by running `ON_BROKEN_ANCHORS=ignore yarn build` instead.
8387

8488
1. Start the local web-server:
8589

@@ -134,9 +138,9 @@ Please assign any pull request (PR) against an issue; this helps the docs team t
134138
135139
Check out the GitHub docs for a refresher on [how to create a pull request](https://docs.github.com/en/desktop/working-with-your-remote-repository-on-github-or-github-enterprise/creating-an-issue-or-pull-request-from-github-desktop).
136140
137-
### Style guidelines
141+
### Style and contribution guidelines
138142
139-
For documentation style guidelines, see ["Style guide"](/contribute/style-guide.md).
143+
For documentation style guidelines, see ["Style guide"](/contribute/style-guide.md).
140144
141145
To check spelling and markdown is correct locally run:
142146
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
receivers:
2+
filelog:
3+
include:
4+
- /opt/data/logs/access-unstructured.log
5+
start_at: beginning
6+
operators:
7+
- type: regex_parser
8+
regex: '^(?P<ip>[\d.]+)\s+-\s+-\s+\[(?P<timestamp>[^\]]+)\]\s+"(?P<method>[A-Z]+)\s+(?P<url>[^\s]+)\s+HTTP/[^\s]+"\s+(?P<status>\d+)\s+(?P<size>\d+)\s+"(?P<referrer>[^"]*)"\s+"(?P<user_agent>[^"]*)"'
9+
timestamp:
10+
parse_from: attributes.timestamp
11+
layout: '%d/%b/%Y:%H:%M:%S %z'
12+
#22/Jan/2019:03:56:14 +0330
13+
processors:
14+
batch:
15+
timeout: 1s
16+
send_batch_size: 100
17+
memory_limiter:
18+
check_interval: 1s
19+
limit_mib: 2048
20+
spike_limit_mib: 256
21+
exporters:
22+
# HTTP setup
23+
otlphttp/hdx:
24+
endpoint: 'http://localhost:4318'
25+
headers:
26+
authorization: <YOUR_INGESTION_API_KEY>
27+
compression: gzip
28+
29+
# gRPC setup (alternative)
30+
otlp/hdx:
31+
endpoint: 'localhost:4317'
32+
headers:
33+
authorization: <YOUR_API_INGESTION_KEY>
34+
compression: gzip
35+
service:
36+
telemetry:
37+
metrics:
38+
address: 0.0.0.0:9888 # Modified as 2 collectors running on same host
39+
pipelines:
40+
logs:
41+
receivers: [filelog]
42+
processors: [batch]
43+
exporters: [otlphttp/hdx]

contribute/autogenerated-documentation-from-source.md

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -61,18 +61,16 @@ TO DO
6161
## Functions
6262

6363
Documentation for functions is autogenerated from the documentation in system tables (`system.functions`) which is
64-
registered along with the function registration in the C++ code.
64+
registered along with the function registration in the C++ code. ([Example](https://github.com/ClickHouse/ClickHouse/blob/a0216c8120f00479f50237e41c897c2bf244e1ef/src/Functions/FunctionChar.cpp#L116-L158))
6565

66-
To add a new page:
67-
- add SQL to generate the markdown from system tables
68-
- update `autogenerate-settings.sh` in the section which specifies which markdown file contents to
69-
copy to which file in between the `<!--AUTOGENERATED_START-->` and `<!--AUTOGENERATED_END-->`
66+
This [script](https://github.com/ClickHouse/clickhouse-docs/blob/main/scripts/settings/autogenerate-settings.sh) is used to generate
67+
the markdown docs for functions.
7068

71-
The following pages are autogenerated from the source code for functions:
72-
- [Arithmetic](/sql-reference/functions/arithmetic-functions) ([SQL](../scripts/settings/arithmetic-functions.sql))
73-
- [Arrays](/sql-reference/functions/array-functions) ([SQL](../scripts/settings/array-functions.sql))
74-
- [Bit](/sql-reference/functions/bit-functions) ([SQL](../scripts/settings/bit-functions.sql))
75-
- [Bitmap](/sql-reference/functions/bitmap-functions) ([SQL](../scripts/settings/bitmap-functions.sql))
76-
- [Comparison](/sql-reference/functions/comparison-functions) ([SQL](../scripts/settings/comparison-functions.sql))
77-
- [Conditional](/sql-reference/functions/conditional-functions) ([SQL](../scripts/settings/conditional-functions.sql))
69+
Adding a new page can be done by:
7870

71+
1. Adding the function [category](https://github.com/ClickHouse/ClickHouse/blob/85700c135ccad89d3651a7a92ca63bb989743ba6/src/Common/FunctionDocumentation.cpp#L222-L273) to the [list of function categories to generate](https://github.com/ClickHouse/clickhouse-docs/blob/c31d64bc5d71c6c3afc5b520dbb73386e303447b/scripts/settings/autogenerate-settings.sh#L253-L278).
72+
2. The docs are automatically generated for the categories defined above by [this SQL code](https://github.com/ClickHouse/clickhouse-docs/blob/main/scripts/settings/generate-functions.sql). It produces a temporary markdown file with convention: `category-functions.md`. If the category name contains spaces, e.g. "String Splitting" then the temporary file will be `string_splitting-functions.md`.
73+
3. Register the temporary file name [here](https://github.com/ClickHouse/clickhouse-docs/blob/c31d64bc5d71c6c3afc5b520dbb73386e303447b/scripts/settings/autogenerate-settings.sh#L372)
74+
4. Register the destination file you want to insert the markdown into [here](https://github.com/ClickHouse/clickhouse-docs/blob/c31d64bc5d71c6c3afc5b520dbb73386e303447b/scripts/settings/autogenerate-settings.sh#L399)
75+
76+
The script takes the content of the temporary markdown file and inserts it into the destination file between tags `<!--AUTOGENERATED_START-->` and `<!--AUTOGENERATED_END-->`. If those tags do not exist you will get a warning.

contribute/style-guide.md

Lines changed: 110 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ sidebar_label: 'Using clickhouse-local database'
1616
slug: /chdb/guides/clickhouse-local
1717
description: 'Learn how to use a clickhouse-local database with chDB'
1818
keywords: ['chdb', 'clickhouse-local']
19+
doc_type: 'reference' (or 'guide' or 'changelog')
1920
---
2021
```
2122

@@ -26,7 +27,7 @@ keywords: ['chdb', 'clickhouse-local']
2627
There is a custom Docusaurus plugin which runs on build that makes the following
2728
checks on front-matter:
2829

29-
- title, description and slug are specified.
30+
- title, description, slug and doc_type (either `reference`, `guide`, `landingpage` or `changelog`) are specified.
3031
- keywords use flow style arrays with single quoted items e.g.
3132
`keywords: ['integrations']`
3233
- single quotes are used for title, description, slug, sidebar_label
@@ -112,12 +113,75 @@ SELECT * FROM system.contributors;
112113
\```
113114
```
114115

116+
Note: in the snippet above `\` is used only for formatting purposes in this guide.
117+
You should not include it when you write markdown.
118+
115119
Code blocks:
116120
- Should always have a language defined immediately next to the opening 3
117121
backticks, without any space.
118122
- Have a title (optional) such as 'Query' or 'Response'
119123
- Use language `response` if it is for the result of a query.
120124

125+
#### Importing code from files or URLs
126+
127+
There are a few additional parameters you can include on a code block if you want
128+
to import code.
129+
130+
To import from a file use `file=`:
131+
132+
```text
133+
\```python file=code_snippets/integrations/example.py
134+
Code will be inserted here
135+
\```
136+
```
137+
138+
When `yarn build` is run, the code from the file will be inserted as text into
139+
the code block.
140+
141+
To import from a url use `url=`:
142+
143+
```text
144+
\```python url=https://raw.githubusercontent.com/ClickHouse/clickhouse-connect/refs/heads/main/examples/pandas_examples.py
145+
Code will be inserted here
146+
\```
147+
```
148+
149+
**File paths are relative to the root of the docs repository**
150+
151+
You should commit the code inserted to the snippet as we want people (or LLMs)
152+
reading the markdown to be able to see the code. The advantage of importing code
153+
to snippets this way is that you can test your snippets externally or store them
154+
wherever you want.
155+
156+
If you want to only import a section from a file, surround the section with `docs-start`
157+
and `docs-end` comments, for example:
158+
159+
```python
160+
a = 200
161+
b = 33
162+
#docs-start
163+
if b > a:
164+
print("b is greater than a")
165+
elif a == b:
166+
print("a and b are equal")
167+
else:
168+
print("a is greater than b")
169+
#docs-end
170+
```
171+
172+
Only the code between those comments will be pulled.
173+
174+
If you want to make multiple code snippets from one file then you can use the `snippet` parameter:
175+
176+
```markdown
177+
178+
\```python url=https://raw.githubusercontent.com/ClickHouse/clickhouse-connect/refs/heads/main/examples/pandas_examples.py snippet=1
179+
Code will be inserted here
180+
\```
181+
```
182+
183+
You will then use `docs-start-1`, `docs-end-1` comments for the first snippet, `docs-start-2`, `docs-end-2` for the second snippet and so on.
184+
121185
### Highlighting
122186

123187
You can highlight lines in a code block using the following keywords:
@@ -412,3 +476,48 @@ vale --filter='.Name == "ClickHouse.Headings"' docs/integrations
412476
This will run only the rule named `Headings` on
413477
the `docs/integrations` directory. Specifying a specific markdown
414478
file is also possible.
479+
480+
## Vertical numbered stepper
481+
482+
It is possible to render numbered steppers, as seen [here](https://clickhouse.com/docs/getting-started/quick-start/cloud)
483+
for example, using the following syntax:
484+
485+
`<VerticalStepper headerLevel="hN"></VerticalStepper>`
486+
487+
For example:
488+
489+
```markdown
490+
<VerticalStepper headerLevel="h2">
491+
## Header 1 {#explicit-anchor-1}
492+
493+
Some content...
494+
495+
## Header 2 {#explicit-anchor-2}
496+
497+
Some more content...
498+
499+
</VerticalStepper>
500+
```
501+
502+
You should specify `N` as the header level you want the vertical stepper to render
503+
for. In the example above, it is `h2` as we are using `##`. Use `h3` for `###`,
504+
`h4` for `####` etc.
505+
506+
The component also works with numbered lists using `headerLevel="list"`. For example:
507+
508+
```markdown
509+
<VerticalStepper headerLevel="h2">
510+
511+
1. First list item
512+
513+
Some content...
514+
515+
2. Second list item
516+
517+
Some more content...
518+
519+
</VerticalStepper>
520+
```
521+
522+
In this case, the first paragraph will be taken to be the label (the text next
523+
to the numbered circles of the vertical stepper) of the stepper.

0 commit comments

Comments
 (0)