Skip to content

Commit 7c8a6a5

Browse files
committed
Merge branch 'main' of https://github.com/ClickHouse/clickhouse-docs into ryans_patch
2 parents 4e5bdf5 + 7b15c96 commit 7c8a6a5

File tree

9,663 files changed

+842050
-163394
lines changed

Some content is hidden

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

9,663 files changed

+842050
-163394
lines changed

.github/CODEOWNERS

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
/docs/en/integrations/ @ClickHouse/integrations
1+
* @ClickHouse/docs
2+
/docs/integrations/ @ClickHouse/integrations @ClickHouse/docs
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Translation Issue Report
2+
description: File a report for translated documentation.
3+
title: "[translation issue]: "
4+
labels: ["translation issue"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Please report any problems found with translations of the documentation
10+
using this form.
11+
- type: dropdown
12+
id: language
13+
attributes:
14+
label: Language
15+
description: For which language are you reporting a translation issue?
16+
options:
17+
- Русский (Russian)
18+
- 中文 (Mandarin)
19+
- 日本語 (Japanese)
20+
default: 0
21+
validations:
22+
required: true
23+
- type: input
24+
id: url
25+
attributes:
26+
label: URL to page
27+
description: Please provide the URL of the page in question.
28+
placeholder: eg. https://clickhouse.com/docs/ru/architecture/replication
29+
validations:
30+
required: true
31+
- type: textarea
32+
id: problem
33+
attributes:
34+
label: What is the problem?
35+
description: Please tell us what the problem is
36+
placeholder: Tell us what you see!
37+
value: "The translation issue on this page is..."
38+
validations:
39+
required: true

.github/dependabot.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ updates:
66
schedule:
77
interval: "monthly"
88
- package-ecosystem: "npm"
9-
directory: "/docs/en/integrations"
9+
directory: "/docs/integrations"
1010
schedule:
1111
interval: "monthly"
1212
# Disable version updates for dependencies in the code snippets
1313
open-pull-requests-limit: 0
1414
- package-ecosystem: "pip"
15-
directory: "/docs/en/integrations"
15+
directory: "/docs/integrations"
1616
schedule:
1717
interval: "monthly"
1818
# Disable version updates for dependencies in the code snippets

.github/pull_request_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
## Checklist
55
- [ ] Delete items not relevant to your PR
66
- [ ] URL changes should add a redirect to the old URL via https://github.com/ClickHouse/clickhouse-docs/blob/main/docusaurus.config.js
7-
- [ ] If adding a new integration page, also add an entry to the integrations list here: https://github.com/ClickHouse/clickhouse-docs/blob/main/docs/en/integrations/index.mdx
7+
- [ ] If adding a new integration page, also add an entry to the integrations list here: https://github.com/ClickHouse/clickhouse-docs/blob/main/docs/integrations/index.mdx

.github/workflows/check-build.yml

Lines changed: 50 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -14,47 +14,69 @@ on:
1414
jobs:
1515
stylecheck:
1616
runs-on: ubuntu-latest
17-
17+
strategy:
18+
matrix:
19+
check_type: [spellcheck, kbcheck, md-lint]
1820
steps:
19-
# Step 1: Check out the repository
20-
- name: Check out repository
21-
uses: actions/checkout@v4
22-
23-
# Step 2: Set up environment if required (e.g., installing Aspell)
21+
# Add setup steps per check here
22+
- uses: actions/checkout@v4
2423
- name: Install Aspell
24+
if: matrix.check_type == 'spellcheck'
2525
run: sudo apt-get update && sudo apt-get install -y aspell aspell-en
26-
27-
# Step 3: Run the spellcheck script
28-
- name: Run spellcheck
29-
run: |
30-
./scripts/check-doc-aspell
31-
continue-on-error: true
32-
id: spellcheck
33-
34-
# Step 4: Setup Python and dependencies for KB checker
3526
- name: Set up Python
27+
if: matrix.check_type == 'kbcheck'
3628
uses: actions/setup-python@v5
3729
with:
3830
python-version: '3.x'
39-
40-
# Step 5: Install Python dependencies
4131
- name: Install dependencies
32+
if: matrix.check_type == 'kbcheck'
4233
run: |
4334
python -m pip install --upgrade pip
4435
pip install -r 'scripts/knowledgebase-checker/requirements.txt'
36+
- name: Setup md-lint environment
37+
if: matrix.check_type == 'md-lint'
38+
uses: actions/setup-node@v3
39+
with:
40+
node-version: 20
41+
- name: Install markdownlint-cli2
42+
if: matrix.check_type == 'md-lint'
43+
run: yarn add -D markdownlint-cli2
4544

46-
# Step 5: Run knowledgebase article checker
47-
- name: Check KB
48-
run: |
49-
./scripts/knowledgebase-checker/knowledgebase_article_checker.py --kb-dir="knowledgebase"
50-
continue-on-error: true
51-
id: kbcheck
52-
53-
# Step 6: Fail the build if any script returns exit code 1
54-
- name: Check exit code
45+
# Run the checks here
46+
- name: Run checks
47+
id: check_step
5548
run: |
56-
if [[ "${{ steps.spellcheck.outcome }}" == "failure" ]] || [[ "${{ steps.kbcheck.outcome }}" == "failure" ]]; then
57-
echo "Style check failed. See the logs for details."
49+
if [[ "${{ matrix.check_type }}" == "spellcheck" ]]; then
50+
./scripts/check-doc-aspell
51+
exit_code=$?
52+
elif [[ "${{ matrix.check_type }}" == "kbcheck" ]]; then
53+
./scripts/knowledgebase-checker/knowledgebase_article_checker.py --kb-dir="knowledgebase"
54+
exit_code=$?
55+
elif [[ "${{ matrix.check_type }}" == "md-lint" ]]; then
56+
yarn markdownlint-cli2 --config ./scripts/.markdownlint-cli2.yaml 'docs/**/*.md'
57+
exit_code=$?
58+
fi
59+
60+
if [[ $exit_code -ne 0 ]]; then
61+
echo "::error::${{ matrix.check_type }} check failed. See logs for details."
5862
exit 1
5963
fi
64+
65+
- name: Set check status
66+
if: steps.check_step.outcome != 'success'
67+
uses: actions/github-script@v6
68+
with:
69+
script: |
70+
core.setFailed('${{ matrix.check_type }} check failed.');
71+
72+
check_overall_status:
73+
needs: stylecheck
74+
runs-on: ubuntu-latest
75+
if: always() # run the job even if stylecheck fails
76+
steps:
77+
- name: Check overall results
78+
if: needs.stylecheck.result != 'success'
79+
run: |
80+
echo "::error::One or more checks of the style check failed."
81+
exit 1
6082

.gitignore

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,22 @@ node_modules
22
.docusaurus
33
.vercel
44
build
5-
docs/en/development
6-
docs/en/engines
7-
docs/en/getting-started
8-
docs/en/interfaces
9-
docs/en/operations
10-
docs/en/sql-reference
5+
docs/development
6+
docs/engines
7+
docs/getting-started
8+
docs/interfaces
9+
docs/operations
10+
docs/sql-reference
11+
docs/_clients
1112
docs/ru
1213
docs/zh
13-
docs/_clients
1414

1515
**/.DS_Store
1616
run.sh
1717
cleanup.sh
1818
update.sh
1919

20-
docs/en/whats-new/changelog/_2023.md
20+
docs/whats-new/changelog/_2023.md
2121

2222
.ignore
2323
.marksman.toml
@@ -40,14 +40,22 @@ active_links.json
4040
scripts/settings/tmp
4141

4242
# Files whose content gets autogenerated
43-
docs/en/cloud/manage/api/invitations-api-reference.md
44-
docs/en/cloud/manage/api/keys-api-reference.md
45-
docs/en/cloud/manage/api/members-api-reference.md
46-
docs/en/cloud/manage/api/organizations-api-reference.md
47-
docs/en/cloud/manage/api/services-api-reference.md
43+
docs/cloud/manage/api/invitations-api-reference.md
44+
docs/cloud/manage/api/keys-api-reference.md
45+
docs/cloud/manage/api/members-api-reference.md
46+
docs/cloud/manage/api/organizations-api-reference.md
47+
docs/cloud/manage/api/services-api-reference.md
48+
docs/cloud/manage/api/privateEndpointConfig-api-reference.md
49+
docs/cloud/manage/api/prometheus-api-reference.md
50+
docs/cloud/manage/api/usageCost-api-reference.md
51+
docs/whats-new/changelog/index.md
4852
.vscode
4953
.aspell.en.prepl
5054
*.md.bak
5155

52-
# Don't ignore generated table of contents files
53-
!toc.json
56+
**.translated
57+
**.translate
58+
ClickHouse/
59+
60+
# Ignore generated table of contents files
61+
docs/cloud/reference/release-notes-index.md

README.md

Lines changed: 40 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -18,25 +18,25 @@
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
21+
## Table of contents {#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
29+
## About this repo {#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
33+
## Run locally {#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

3737
1. Install Git and npm. If you already have them installed, skip this step:
3838

39-
| OS | Package manager | Install command |
39+
| OS | Package manager | Install command |
4040
| ---| --------------- | --------------- |
4141
| macOS | Homebrew | `brew install git node` |
4242
| Ubuntu | Apt | `sudo apt install git nodejs npm` |
@@ -69,22 +69,16 @@ You can run a copy of this website locally within a few steps. Some folks find t
6969
# ✨ Done in 6.44s.
7070
```
7171

72-
1. Use Yarn to grab the latest documentation changes from the `ClickHouse/ClickHouse` repository:
72+
1. Use Yarn to grab the latest documentation changes from the `ClickHouse/ClickHouse` repository and build the documentation using `yarn-build`:
7373

7474
```shell
75-
yarn copy-clickhouse-repo-docs
75+
yarn build
7676
7777
# Cloning into 'ClickHouse'...
7878
# ...
79-
# Copying docs from ClickHouse ...
80-
# Successfully executed copy from master
81-
# ✨ Done in 18.56s.
82-
```
83-
84-
Alternatively, you can use a local copy of `ClickHouse/ClickHouse` if you already have that repository cloned locally with `-l`.
85-
86-
```shell
87-
yarn copy-clickhouse-repo-docs -l "/Users/johnny/clickhouse/"
79+
# [SUCCESS] Generated static files in "build".
80+
# [INFO] Use `npm run serve` command to test your build locally.
81+
# ✨ Done in 105.96s.
8882
```
8983

9084
1. Start the local web-server:
@@ -98,35 +92,51 @@ You can run a copy of this website locally within a few steps. Some folks find t
9892
#
9993
```
10094

101-
This command will build the documentation site and serve it locally. Once the build has finished, browse the website at [localhost:3000](http://localhost:3000/docs/en/intro).
95+
This command will build the documentation site and serve it locally. Once the build has finished, browse the website at [localhost:3000](http://localhost:3000/docs/intro).
10296

10397
1. To stop the local server, press `ctrl` + `c` in the terminal window.
10498

10599
If you want to build a static copy of this repository that doesn't require a constant server running to view, you can use `yarn build` instead of `yarn start`. The `yarn build` will output a static copy of the website in the `/build` directory. This process takes around 10 minutes to complete on an M1 Macbook with 8GB RAM.
106100
107-
### Notes
101+
1. Should you wish to make changes to documents which are located in the ClickHouse/ClickHouse repo and want to visualize what the changes made look like locally you can use `yarn copy-clickhouse-repo-docs -l` and provide a path to the ClickHouse repository on your local machine, for example:
102+
103+
```
104+
# yarn copy-clickhouse-repo-docs -l /Users/user/Desktop/ClickHouse
105+
# Successfully executed local copy
106+
# ✨ Done in 1.15s.
107+
```
108+
109+
We recommend to install rsync in order to only copy what is needed, however the script will fallback to using `cp` if rsync is not available.
110+
111+
Running `yarn copy-clickhouse-repo-docs` without any arguments will pull in the latest docs changes from github.
112+
113+
### Notes {#notes}
108114
109115
Here are some things to keep in mind when building a local copy of the ClickHouse docs site.
110116
111-
#### Build-time
117+
#### Build-time {#build-time}
112118
113119
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.
114120
115-
#### Redirects
121+
#### Redirects {#redirects}
116122
117-
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/en/intro`. However, on a local copy of the site, you will see a 404 page if you try to visit `localhost:8000/docs`.
123+
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`.
118124
119-
## Contributing
125+
## Contributing {#contributing}
120126
121127
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).
122128

123-
### Pull requests
129+
### Pull requests {#pull-requests}
124130

125131
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.
126132
127133
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).
128134
129-
### Tests and CI/CD
135+
### Style guidelines
136+
137+
For style guidelines, see ["Style guide"](/contribute/style-guide.md).
138+
139+
### Tests and CI/CD {#tests-and-cicd}
130140
131141
There are five workflows that run against PRs in this repo:
132142
@@ -138,7 +148,7 @@ There are five workflows that run against PRs in this repo:
138148
| [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. |
139149
| [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. |
140150
141-
### Quick contributions
151+
### Quick contributions {#quick-contributions}
142152
143153
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:
144154
@@ -150,33 +160,33 @@ Have you noticed a typo or found some wonky formatting? For small contributions
150160
151161
1. Once you're in GitHub, click the pencil icon to edit this page:
152162

153-
![](./images/readme-pencil-icon.png)
163+
![README Pencil Icon](./images/readme-pencil-icon.png)
154164

155165
1. GitHub will _fork_ the repository for you. This creates a copy of the `clickhouse-docs` repository on your personal GitHub account.
156166
1. Make your changes in the textbox. Once you're done, click **Commit changes**:
157167
158-
![](./images/readme-commit-changes.png)
168+
![README Commit Changes](./images/readme-commit-changes.png)
159169
160170
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.
161171
1. Make sure **Create a new branch** is selected, and click **Propose changes**:
162172
163-
![](./images/readme-propose-changes.png)
173+
![README Propose Changes](./images/readme-propose-changes.png)
164174
165175
1. A new page should open with a new pull request. Double-check that the title and description are accurate.
166176
1. If you've spoken to someone on the docs team about your changes, tag them into the **Reviewers** section:
167177

168-
![](./images/readme-create-pull-request.png)
178+
![README Create Pull Request](./images/readme-create-pull-request.png)
169179

170180
If you haven't mentioned your changes to anyone yet, leave the **Reviewers** section blank.
171181
172182
1. Click **Create pull request**.
173183
174184
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.
175185
176-
## Issues
186+
## Issues {#issues}
177187
178188
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!
179189
180-
## License
190+
## License {#license}
181191
182192
This work is licensed under a [Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License](http://creativecommons.org/licenses/by-nc-sa/4.0/).

0 commit comments

Comments
 (0)