Skip to content

Commit 8319423

Browse files
authored
Merge branch 'main' of https://github.com/ClickHouse/clickhouse-docs into Blargian-patch-33
2 parents 793595a + b6274ee commit 8319423

File tree

705 files changed

+14575
-5163
lines changed

Some content is hidden

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

705 files changed

+14575
-5163
lines changed

.github/workflows/badges-notify.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Weekly Badge Monitor
2+
3+
on:
4+
schedule:
5+
# Run every Monday at 10:00 AM Amsterdam time (UTC+1/+2)
6+
# Using 8:00 UTC to account for Amsterdam time (adjusts for DST)
7+
- cron: '0 8 * * 1'
8+
workflow_dispatch: # Allow manual triggering
9+
10+
jobs:
11+
monitor-badges:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v4
17+
18+
- name: Make script executable
19+
run: chmod +x scripts/badger.sh
20+
21+
- name: Run badge finder script
22+
id: find_badges
23+
run: |
24+
# Run the script and capture output
25+
SCRIPT_OUTPUT=$(scripts/badger.sh)
26+
27+
# Escape the output for JSON and store in GitHub output
28+
# Replace newlines with \n and escape quotes
29+
ESCAPED_OUTPUT=$(echo "$SCRIPT_OUTPUT" | sed 's/\\/\\\\/g' | sed 's/"/\\"/g' | sed ':a;N;$!ba;s/\n/\\n/g')
30+
31+
echo "badges_output<<EOF" >> $GITHUB_OUTPUT
32+
echo "$ESCAPED_OUTPUT" >> $GITHUB_OUTPUT
33+
echo "EOF" >> $GITHUB_OUTPUT
34+
35+
- name: Send webhook
36+
env:
37+
WEBHOOK_URL: ${{ secrets.DOCS_BADGER }}
38+
BADGES_OUTPUT: ${{ steps.find_badges.outputs.badges_output }}
39+
run: |
40+
# Create JSON payload
41+
JSON_PAYLOAD=$(cat <<EOF
42+
{
43+
"badges_list": "$BADGES_OUTPUT"
44+
}
45+
EOF
46+
)
47+
48+
# Send webhook
49+
curl -X POST \
50+
-H "Content-Type: application/json" \
51+
-d "$JSON_PAYLOAD" \
52+
"$WEBHOOK_URL"
53+
54+
- name: Log completion
55+
run: |
56+
echo "Badge monitoring completed successfully"
57+
echo "Webhook sent to configured endpoint"

.gitignore

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,16 +55,22 @@ static/knowledgebase_toc.json
5555
.frontmatter-validation-failed
5656
logs/
5757

58+
# Landing page files with autogenerated table of contents
59+
docs/cloud/reference/release-notes-index.md
60+
docs/cloud/manage/api/api-reference-index.md
61+
docs/getting-started/index.md
62+
docs/data-modeling/projections/index.md
63+
docs/cloud/manage/jan2025_faq/index.md
64+
docs/chdb/guides/index.md
65+
docs/use-cases/AI_ML/index.md
66+
docs/use-cases/AI_ML/MCP/index.md
67+
docs/use-cases/AI_ML/MCP/ai_agent_libraries/index.md
68+
docs/integrations/data-ingestion/clickpipes/kafka/index.md
69+
5870
.vscode
5971
.aspell.en.prepl
6072
*.md.bak
6173

6274
**.translated
6375
**.translate
6476
/ClickHouse/
65-
66-
# Ignore table of contents files
67-
docs/cloud/reference/release-notes-index.md
68-
docs/whats-new/changelog/index.md
69-
docs/cloud/manage/api/api-reference-index.md
70-
docs/getting-started/index.md

README.md

Lines changed: 18 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<div align=center>
22

3-
![Website](https://img.shields.io/website?up_message=AVAILABLE&down_message=DOWN&url=https%3A%2F%2Fclickhouse.com%2Fdocs&style=for-the-badge)
3+
[![Website](https://img.shields.io/website?up_message=AVAILABLE&down_message=DOWN&url=https%3A%2F%2Fclickhouse.com%2Fdocs&style=for-the-badge)](https://clickhouse.com)
44
[![CC BY-NC-SA 4.0 License](https://img.shields.io/badge/license-CC-blueviolet?style=for-the-badge)](http://creativecommons.org/licenses/by-nc-sa/4.0/)
5-
![Checks](https://img.shields.io/github/actions/workflow/status/clickhouse/clickhouse-docs/debug.yml?style=for-the-badge&label=Checks)
5+
[![Checks](https://img.shields.io/github/actions/workflow/status/clickhouse/clickhouse-docs/debug.yml?style=for-the-badge&label=Checks)](https://github.com/ClickHouse/clickhouse-docs/actions)
66

77
<picture align=center>
88
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/ClickHouse/clickhouse-docs/assets/9611008/4ef9c104-2d3f-4646-b186-507358d2fe28">
@@ -18,19 +18,19 @@
1818

1919
ClickHouse is blazing fast, but understanding ClickHouse and using it effectively is a journey. The documentation is your source for gaining the knowledge you need to be successful with your ClickHouse projects and applications. [Head over to clickhouse.com/docs to learn more →](https://clickhouse.com/)
2020

21-
## Table of contents {#table-of-contents}
21+
## Table of contents
2222

2323
- [About this repo](#about-this-repo)
2424
- [Run locally](#run-locally)
2525
- [Contributing](#contributing)
2626
- [Issues](#issues)
2727
- [License](#license)
2828

29-
## About this repo {#about-this-repo}
29+
## About this repo
3030

3131
This repository manages the documentation for [ClickHouse](https://clickhouse.com/docs). The content is built with [Docusaurus](https://docusaurus.io/) and hosted on [Vercel](https://vercel.com). Documentation content is written in Markdown and is held in the `/docs` directory.
3232

33-
## Run locally {#run-locally}
33+
## Run locally
3434

3535
You can run a copy of this website locally within a few steps. Some folks find this useful when contributing so they can see precisely what their changes will look like on the production site.
3636

@@ -116,23 +116,19 @@ To check spelling and markdown is correct locally run:
116116
yarn check-style
117117
```
118118
119-
### Notes {#notes}
119+
### Notes
120120
121121
Here are some things to keep in mind when building a local copy of the ClickHouse docs site.
122122
123-
#### Build-time {#build-time}
124-
125-
Due to the complex structure of this repo, the docs site can take some time to build locally. As a benchmark, it takes ~3 minutes to build on an M1 Macbook with 8GB RAM.
126-
127-
#### Redirects {#redirects}
123+
#### Redirects
128124
129125
Due to how the local server is built, redirects will not work. For example, visiting `clickhouse.com/docs` on the production site will lead you to `clickhouse.com/docs/intro`. However, on a local copy of the site, you will see a 404 page if you try to visit `localhost:8000/docs`.
130126
131-
## Contributing {#contributing}
127+
## Contributing
132128
133129
Want to help out? Contributions are always welcome! If you want to help out but aren't sure where to start, check out the [issues board](https://github.com/clickhouse/clickhouse-docs/issues).
134130

135-
### Pull requests {#pull-requests}
131+
### Pull requests
136132

137133
Please assign any pull request (PR) against an issue; this helps the docs team track who is working on what and what each PR is meant to address. If there isn't an issue for the specific _thing_ you want to work on, quickly create one and comment so that it can be assigned to you. One of the repository maintainers will add you as an assignee.
138134
@@ -153,7 +149,7 @@ yarn check-style
153149
For an overview of how reference documentation such as settings, system tables
154150
and functions are generated from the source code, see ["Generating documentation from source code"](/contribute/autogenerated-documentation-from-source.md)
155151
156-
### Tests and CI/CD {#tests-and-cicd}
152+
### Tests and CI/CD
157153
158154
There are five workflows that run against PRs in this repo:
159155
@@ -165,45 +161,45 @@ There are five workflows that run against PRs in this repo:
165161
| [Scheduled Vercel build](https://github.com/ClickHouse/clickhouse-docs/blob/main/.github/workflows/scheduled-vercel-build.yml) | Builds the site every day at 00:10 UTC and hosts the build on Vercel. |
166162
| [Trigger build](https://github.com/ClickHouse/clickhouse-docs/blob/main/.github/workflows/trigger-build.yml) | Uses the [peter-evans/repository-dispatch@v2](https://github.com/peter-evans/repository-dispatch) workflow to create a repository dispatch. |
167163
168-
### Quick contributions {#quick-contributions}
164+
### Quick contributions
169165
170166
Have you noticed a typo or found some wonky formatting? For small contributions like these, it's usually faster and easier to make your changes directly in GitHub. Here's a quick guide to show you how the GitHub editor works:
171167
172168
1. Each page in Clickhouse.com/docs has an **Edit this page** link at the top:
173169
174-
![The ClickHouse Docs website with the edit button highlighted.](./static/images/contribute/readme-edit-this-page.png)
170+
![The ClickHouse Docs website with the edit button highlighted.](./static/images/contributing/readme-edit-this-page.png)
175171
176172
Click this button to edit this page in GitHub.
177173
178174
1. Once you're in GitHub, click the pencil icon to edit this page:
179175

180-
![README Pencil Icon](./static/images/contribute/readme-pencil-icon.png)
176+
![README Pencil Icon](./static/images/contributing/readme-pencil-icon.png)
181177

182178
1. GitHub will _fork_ the repository for you. This creates a copy of the `clickhouse-docs` repository on your personal GitHub account.
183179
1. Make your changes in the textbox. Once you're done, click **Commit changes**:
184180
185-
![README Commit Changes](./static/images/contribute/readme-commit-changes.png)
181+
![README Commit Changes](./static/images/contributing/readme-commit-changes.png)
186182
187183
1. In the **Propose changes** popup, enter a descriptive title to explain the changes you just made. Keep this title to 10 words or less. If your changes are fairly complex and need further explanation, enter your comments into the **Extended description** field.
188184
1. Make sure **Create a new branch** is selected, and click **Propose changes**:
189185
190-
![README Propose Changes](./static/images/contribute/readme-propose-changes.png)
186+
![README Propose Changes](./static/images/contributing/readme-propose-changes.png)
191187
192188
1. A new page should open with a new pull request. Double-check that the title and description are accurate.
193189
1. If you've spoken to someone on the docs team about your changes, tag them into the **Reviewers** section:
194190

195-
![README Create Pull Request](./static/images/contribute/readme-create-pull-request.png)
191+
![README Create Pull Request](./static/images/contributing/readme-create-pull-request.png)
196192

197193
If you haven't mentioned your changes to anyone yet, leave the **Reviewers** section blank.
198194
199195
1. Click **Create pull request**.
200196
201197
At this point, your pull request will be handed over to the docs team, who will review it and suggest or make changes where necessary.
202198
203-
## Issues {#issues}
199+
## Issues
204200
205201
Found a problem with the Clickhouse docs site? [Please raise an issue](https://github.com/clickhouse/clickhouse-docs/issues/new). Be as specific and descriptive as possible; screenshots help!
206202
207-
## License {#license}
203+
## License
208204
209205
This work is licensed under a [Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License](http://creativecommons.org/licenses/by-nc-sa/4.0/).

contribute/autogenerated-documentation-from-source.md

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
# Generating documentation from source code
22

33
A [script in our docs repo](https://github.com/ClickHouse/clickhouse-docs/blob/main/scripts/settings/autogenerate-settings.sh)
4-
extracts setting names, descriptions, default values, etc. from ClickHouse's source code.
4+
is used to run SQL queries which generate markdown documentation from the system tables in ClickHouse and insert it
5+
into the appropriate pages before build time of the docs.
56

67
## Session settings
78

89
Documentation for session settings is autogenerated from source file [`src/Core/Settings.cpp`](https://github.com/ClickHouse/ClickHouse/blob/master/src/Core/Settings.cpp).
10+
[SQL](../scripts/settings/session-settings.sql)
911

1012
## Format settings
1113

1214
Documentation for session settings is autogenerated from source file [`src/Core/FormatFactorySettings.h`](https://github.com/ClickHouse/ClickHouse/blob/master/src/Core/FormatFactorySettings.h).
15+
[SQL](../scripts/settings/format-settings.sql)
1316

1417
## Server settings
1518

@@ -43,14 +46,33 @@ If it is, then please edit the setting description in the source code documentat
4346
in [`ServerSettings.cpp`](https://github.com/ClickHouse/ClickHouse/blob/master/src/Core/ServerSettings.cpp)
4447
or else edit `_server_settings_outside_source.md`.**
4548

49+
[SQL](../scripts/settings/global-server-settings.sql)
50+
4651
## MergeTree settings
4752

4853
Documentation for MergeTree settings is autogenerated from [MergeTreeSettings.cpp](https://github.com/ClickHouse/ClickHouse/blob/master/src/Storages/MergeTree/MergeTreeSettings.cpp)
4954

55+
[SQL](../scripts/settings/mergetree-settings.sql)
56+
5057
## System tables
5158

52-
TO DO. ETA April.
59+
TO DO
5360

5461
## Functions
5562

56-
TO DO. ETA April/May.
63+
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.
65+
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-->`
70+
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))
78+

contribute/style-guide.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ When using URL parameters to control which version of documentation is displayed
340340
there are conventions to follow for reliable functionality.
341341
Here's how the `?v=v08` parameter relates to the snippet selection:
342342

343-
#### How It Works
343+
#### How it works
344344

345345
The URL parameter acts as a selector that matches against the `version` property
346346
in your component configuration. For example:
@@ -393,3 +393,22 @@ show_related_blogs: true
393393

394394
This will show it on the page, assuming there is a matching blog. If there is no
395395
match then it remains hidden.
396+
397+
## Vale
398+
399+
Vale is a command-line tool that brings code-like linting to prose.
400+
We have a number of rules set up to ensure that our documentation is
401+
consistent in style.
402+
403+
The style rules are located at `/styles/ClickHouse`, and largely based
404+
off of the Google styleset, with some ClickHouse specific adaptions.
405+
If you want to check only a specific rule locally, you
406+
can run:
407+
408+
```bash
409+
vale --filter='.Name == "ClickHouse.Headings"' docs/integrations
410+
```
411+
412+
This will run only the rule named `Headings` on
413+
the `docs/integrations` directory. Specifying a specific markdown
414+
file is also possible.

docs/_snippets/_GCS_authentication_and_bucket.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import Image from '@theme/IdealImage';
1919

2020
<Image size="md" img={GCS_bucket_2} alt="Creating a GCS bucket in US East 4" border />
2121

22-
### Generate an Access key {#generate-an-access-key}
22+
### Generate an access key {#generate-an-access-key}
2323

2424
### Create a service account HMAC key and secret {#create-a-service-account-hmac-key-and-secret}
2525

docs/_snippets/_add_superset_detail.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ There are a few tasks to be done before running `docker compose`:
1313
The commands below are to be run from the top level of the GitHub repo, `superset`.
1414
:::
1515

16-
## Official ClickHouse Connect driver {#official-clickhouse-connect-driver}
16+
## Official ClickHouse connect driver {#official-clickhouse-connect-driver}
1717

1818
To make the ClickHouse Connect driver available in the Superset deployment add it to the local requirements file:
1919

docs/_snippets/_users-and-roles-common.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ Roles are used to define groups of users for certain privileges instead of manag
269269
Verify that only the above two rows are returned, rows with the value `B` in `column1` should be excluded.
270270
:::
271271

272-
## Modifying Users and Roles {#modifying-users-and-roles}
272+
## Modifying users and roles {#modifying-users-and-roles}
273273

274274
Users can be assigned multiple roles for a combination of privileges needed. When using multiple roles, the system will combine the roles to determine privileges, the net effect will be that the role permissions will be cumulative.
275275

docs/about-us/beta-and-experimental-features.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,19 @@ Due to the uncertainty of when features are classified as generally available, w
1414

1515
The sections below explicitly describe the properties of **Beta** and **Experimental** features:
1616

17-
## Beta Features {#beta-features}
17+
## Beta features {#beta-features}
1818

1919
- Under active development to make them generally available (GA)
2020
- Main known issues can be tracked on GitHub
2121
- Functionality may change in the future
2222
- Possibly enabled in ClickHouse Cloud
2323
- The ClickHouse team supports beta features
2424

25-
The following features are considered Beta in ClickHouse Cloud and are available for use in ClickHouse Cloud Services, even though they may be currently under a ClickHouse SETTING named ```allow_experimental_*```:
25+
You can find below the features considered Beta in ClickHouse Cloud and are available for use in your ClickHouse Cloud Services.
2626

2727
Note: please be sure to be using a current version of the ClickHouse [compatibility](/operations/settings/settings#compatibility) setting to be using a recently introduced feature.
2828

29-
## Experimental Features {#experimental-features}
29+
## Experimental features {#experimental-features}
3030

3131
- May never become GA
3232
- May be removed

0 commit comments

Comments
 (0)