Skip to content

Commit 481153e

Browse files
committed
Merge branch 'main' of https://github.com/ClickHouse/clickhouse-docs into scripts_refactor
2 parents f0af954 + f8f4e92 commit 481153e

File tree

475 files changed

+19205
-7959
lines changed

Some content is hidden

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

475 files changed

+19205
-7959
lines changed

.github/workflows/check-build.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
---
2+
name: Style check
3+
4+
env:
5+
# Force the stdout and stderr streams to be unbuffered
6+
PYTHONUNBUFFERED: 1
7+
8+
on:
9+
pull_request:
10+
types:
11+
- synchronize
12+
- reopened
13+
- opened
14+
jobs:
15+
stylecheck:
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
# Step 1: Check out the repository
20+
- name: Check out repository
21+
uses: actions/checkout@v3
22+
23+
# Step 2: Set up environment if required (e.g., installing Aspell)
24+
- name: Install Aspell
25+
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
35+
- name: Set up Python
36+
uses: actions/setup-python@v3
37+
with:
38+
python-version: '3.x'
39+
40+
# Step 5: Install Python dependencies
41+
- name: Install dependencies
42+
run: |
43+
python -m pip install --upgrade pip
44+
pip install -r 'scripts/knowledgebase-checker/requirements.txt'
45+
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
55+
run: |
56+
if [[ "${{ steps.spellcheck.outcome }}" == "failure" ]] || [[ "${{ steps.kbcheck.outcome }}" == "failure" ]]; then
57+
echo "Style check failed. See the logs for details."
58+
exit 1
59+
fi
60+

.github/workflows/pull-request.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ on: # yamllint disable-line rule:truthy
1414
- synchronize
1515
- reopened
1616
- opened
17-
branches-ignore:
18-
- 'new-nav'
1917

2018
# Cancel the previous wf run in PRs.
2119
concurrency:

.gitignore

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,17 @@ orphaned_pages.txt
3535
active_links.txt
3636
active_links.json
3737

38-
# Files used by scripts to autogenerate settings
38+
# Files used by scripts to autogenerate settings and do spellcheck
3939
FormatFactorySettingsDeclaration.h
4040
FormatFactorySettings.h
4141
Settings.cpp
42+
43+
# Files whose content gets autogenerated
44+
docs/en/cloud/manage/api/invitations-api-reference.md
45+
docs/en/cloud/manage/api/keys-api-reference.md
46+
docs/en/cloud/manage/api/members-api-reference.md
47+
docs/en/cloud/manage/api/organizations-api-reference.md
48+
docs/en/cloud/manage/api/services-api-reference.md
49+
.vscode
50+
.aspell.en.prepl
51+
*.md.bak

clickhouseapi.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ function generateDocusaurusMarkdown(spec, groupedEndpoints, prefix) {
5252

5353
markdownContent += `| Method | Path |\n`
5454
markdownContent += `| :----- | :--- |\n`
55-
markdownContent += `| ${method.toUpperCase()} | ${path} |\n\n`
55+
markdownContent += `| ${method.toUpperCase()} | \`${path}\` |\n\n`
5656

5757
markdownContent += `### Request\n\n`;
5858

contrib-writing-guide.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ sudo apt-get install npm
4343
sudo npm install --global yarn
4444
```
4545

46-
note: if the Node version available in your distro is old (<=v16), you can use [nvm](https://github.com/nvm-sh/nvm#installing-and-updating) to pick a specific one.
46+
note: if the Node version available in your distro is old (`<=v16`), you can use [nvm](https://github.com/nvm-sh/nvm#installing-and-updating) to pick a specific one.
4747

4848
for example to use node 18:
4949

@@ -477,10 +477,12 @@ cd $DOCS/ClickHouse/tests/integration/
477477

478478
Code highlighting is based on the language chosen for your code blocks. Specify the language when you start the code block:
479479

480-
<pre lang="no-highlight"><code>```sql
480+
<pre lang="no-highlight"><code>
481+
```sql
481482
SELECT firstname from imdb.actors;
482483
```
483-
</code></pre>
484+
</code>
485+
</pre>
484486

485487
```sql
486488
SELECT firstname from imdb.actors;

copyClickhouseRepoDocs.sh

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
1-
#! ./bin/bash
1+
#! /bin/bash
22

33
SCRIPT_NAME=$(basename "$0")
44

5+
rm -rf ClickHouse
56
echo "[$SCRIPT_NAME] Start tasks for copying docs from ClickHouse repo"
67

78
# Clone ClickHouse repo
89
echo "[$SCRIPT_NAME] Start cloning ClickHouse repo"
9-
git clone --depth 1 https://github.com/ClickHouse/ClickHouse.git
10+
git clone --depth 1 https://github.com/ClickHouse/ClickHouse.git temp
11+
cp -r temp/ ClickHouse/
12+
rm -rf temp
1013
echo "[$SCRIPT_NAME] Cloning completed"
1114

1215
# Copy docs folders from ClickHouse repo to docs folder
@@ -28,13 +31,21 @@ echo "[$SCRIPT_NAME] Copying completed"
2831

2932
echo "[$SCRIPT_NAME] Generate changelog"
3033
cp docs/en/_placeholders/changelog/_index.md docs/en/whats-new/changelog/index.md
31-
sed "0,/^# $(date +%Y) Changelog/d" \
32-
< ClickHouse/CHANGELOG.md \
33-
>> docs/en/whats-new/changelog/index.md
34+
if grep -q '^# $(date +%Y) Changelog' ClickHouse/CHANGELOG.md; then
35+
sed '/^# $(date +%Y) Changelog/d' ClickHouse/CHANGELOG.md > temp.txt
36+
cat >> docs/en/whats-new/changelog/index.md
37+
rm temp.txt
38+
echo "$(date +%Y) Changelog was updated."
39+
else
40+
current_year="$(date +%Y)"
41+
previous_year="$(($current_year - 1))"
42+
echo "No Changelog found for $current_year."
43+
echo -e ":::note\nThere have been no new releases yet for $current_year. \n View changelog for the year [$previous_year](/docs/en/whats-new/changelog/$previous_year).\n:::" >> docs/en/whats-new/changelog/index.md
44+
fi
3445

3546
# Delete ClickHouse repo
3647
echo "[$SCRIPT_NAME] Start deleting ClickHouse repo"
37-
rm -r ClickHouse
48+
rm -rf ClickHouse
3849
echo "[$SCRIPT_NAME] Deleting ClickHouse repo completed"
3950

4051
echo "[$SCRIPT_NAME] Finish tasks for copying docs from ClickHouse repo"
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
slug: /en/whats-new/changelog/
33
sidebar_position: 2
4-
sidebar_label: 2024
5-
title: 2024 Changelog
4+
sidebar_label: 2025
5+
title: 2025 Changelog
66
note: This file is autogenerated by the yarn new-build
77
---
88

docs/en/_snippets/_GCS_authentication_and_bucket.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11

2-
<details><summary>Create GCS buckets and an HMAC key</summary>
2+
<details>
3+
<summary>Create GCS buckets and an HMAC key</summary>
34

45
### ch_bucket_us_east1
56

docs/en/_snippets/_S3_authentication_and_bucket.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11

2-
<details><summary>Create S3 buckets and an IAM user</summary>
2+
<details>
3+
<summary>Create S3 buckets and an IAM user</summary>
34

45
This article demonstrates the basics of how to configure an AWS IAM user, create an S3 bucket and configure ClickHouse to use the bucket as an S3 disk. You should work with your security team to determine the permissions to be used, and consider these as a starting point.
56

docs/en/_snippets/_add_remote_ip_access_list_detail.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
<details><summary>Manage your IP Access List</summary>
1+
<details>
2+
<summary>Manage your IP Access List</summary>
23

34
From your ClickHouse Cloud services list choose the service that you will work with and switch to **Security**. If the IP Access List does not contain the IP Address or range of the remote system that needs to connect to your ClickHouse Cloud service, then you can resolve the problem with **Add entry**:
45

0 commit comments

Comments
 (0)