Skip to content

Commit 2f30f8a

Browse files
committed
update docs homepage
2 parents c0020d1 + 4b65ff2 commit 2f30f8a

File tree

289 files changed

+5087
-4919
lines changed

Some content is hidden

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

289 files changed

+5087
-4919
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,4 @@ ClickHouse/
6262
# Ignore table of contents files
6363
docs/cloud/reference/release-notes-index.md
6464
docs/whats-new/changelog/index.md
65+
docs/cloud/manage/api/api-reference-index.md

contribute/style-guide.md

Lines changed: 71 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,38 @@
11
# ClickHouse docs style guide
22

3-
In this document, you will find a number of style guidelines for writing documentation.
4-
The rules in this guide are intended to assist in helping us to create a high
5-
quality documentation offering on par with the quality of ClickHouse itself.
3+
In this document, you will find a number of style guidelines for writing ClickHouse
4+
documentation. As documentation is a collective effort, these guidelines are
5+
intended to help all of us ensure quality and consistency across our documentation.
66

77
## YAML front matter
88

9-
Begin every new markdown document with YAML front-matter:
9+
Begin every new Markdown document with YAML front-matter:
1010

1111
```markdown
1212
---
13-
title: Using a clickhouse-local database
14-
sidebar_label: Using clickhouse-local database
13+
title: 'Using a clickhouse-local database'
14+
sidebar_label: 'Using clickhouse-local database'
1515
slug: /chdb/guides/clickhouse-local
16-
description: Learn how to use a clickhouse-local database with chDB
17-
keywords: [chdb, clickhouse-local]
16+
description: 'Learn how to use a clickhouse-local database with chDB'
17+
keywords: ['chdb', 'clickhouse-local']
1818
---
1919
```
2020

21+
### Associated markdown rule or CI check
22+
23+
#### front-matter validation
24+
25+
There is a custom Docusaurus plugin which runs on build that makes the following
26+
checks on front-matter:
27+
28+
- title, description and slug are specified.
29+
- keywords use flow style arrays with single quoted items e.g.
30+
`keywords: ['integrations']`
31+
- single quotes are used for title, description, slug, sidebar_label
32+
- there is an empty line after the YAML frontmatter block
33+
34+
For implementation details see [plugins/frontmatter-validation](https://github.com/ClickHouse/clickhouse-docs/tree/main/plugins/frontmatter-validation)
35+
2136
## Explicit header tags
2237

2338
Due to the way our translation system works, it is necessary to add an explicit
@@ -61,21 +76,31 @@ keywords: [chdb, clickhouse-local]
6176
import clickhouse-local-1 from '@site/static/images/chdb/guides/clickhouse-local-1.png'
6277
import clickhouse-local-2 from '@site/static/images/chdb/guides/clickhouse-local-2.png'
6378
import clickhouse-local-3 from '@site/static/images/chdb/guides/clickhouse-local-3.png'
79+
import Image from '@theme/IdealImage';
6480
```
6581

66-
Use the `<img/>` tag to place your image in the appropriate place:
82+
To render images we use a fork of the IdealImage plugin. This generates multiple variants of an image, [asynchronously loading them as well as selecting the most appropriate based on the network connection](https://github.com/stereobooster/react-ideal-image/blob/master/introduction.md).
83+
84+
Ensure you import the `Image` component as shown above.
85+
86+
Use the `<Image/>` tag to place your image in the appropriate place:
6787

6888
```markdown
6989
Here is some example text which refers to the image below:
7090

71-
<img src={clickhouse-local-1}
72-
alt='DESCRIPTION OF THE IMAGE'
73-
style={{width: '800px'}} // optional
74-
/>
91+
<Image img={clickhouse-local-1} alt='DESCRIPTION OF THE IMAGE' size="md" border background="black"/>
7592

7693
Here is another paragraph...
7794
```
7895

96+
This component takes a number of props:
97+
98+
1. `img` - the imported image
99+
2. `alt` - mandatory alternate text specified
100+
3. `size` - either `lg` (width 1024px), `md` (width 600px), `sm` (width 300px) or `logo` (48x). This sets the maximum image size. Lower resolutions maybe used on smaller screens or slower connections.
101+
4. `border` - Applies a border. **Use for screenshots only.**
102+
5. `background` - either `white` or `black`. Applicable if your image is transparent. All new images must use `black`.
103+
79104
## Codeblocks
80105

81106
Codeblocks are defined using backticks. For example:
@@ -191,4 +216,37 @@ export function Anchor(props) {
191216
```
192217
- Replace `<span id="some-id"></span>` with `Anchor id="some-id"/>`
193218

219+
### Floating pages
220+
221+
In order to prevent pages from becoming 'floating' or 'orphaned' it is
222+
necessary that you add a newly created page to `sidebars.js`. We have a [custom
223+
docusaurus plugin](plugins/checkFloatingPages.js) to catch dangling pages.
224+
225+
If there is some specific reason that you need to bypass this check, you can
226+
add an exception to `floating-pages-exceptions.txt` in the plugins directory.
227+
228+
When adding a new page from the ClickHouse/ClickHouse repo this check will fail
229+
unless the file is in a folder which [`sidebars.js`](https://github.com/ClickHouse/clickhouse-docs/blob/main/sidebars.js)
230+
uses with `type: autogenerated` to generate the navigation items from the markdown
231+
files in the folder.
232+
233+
If you've added a new page on ClickHouse/ClickHouse and this check is failing.
234+
235+
For example:
236+
237+
```text
238+
✅ All markdown files passed frontmatter validation.
239+
Loaded 3 exceptions from /opt/clickhouse-docs/plugins/floating-pages-exceptions.txt
240+
Skipping excepted page: index
241+
Skipping excepted page: integrations/language-clients/java/client-v1
242+
Skipping excepted page: integrations/language-clients/java/jdbc-v1
243+
�[31m1 floating pages found:�[0m
244+
- /opt/clickhouse-docs/docs/operations/query-condition-cache.md
245+
```
246+
247+
You will need to open a PR on docs repo to add this page to [`floating-pages-exceptions.txt`](https://github.com/ClickHouse/clickhouse-docs/blob/main/plugins/floating-pages-exceptions.txt). Once it is merged
248+
you can then rerun the docs check on the ClickHouse/ClickHouse repo which
249+
should pass. Finally open another PR on the docs repo again to remove the
250+
file from the exception list and add it to `sidebars.js` in the appropriate
251+
sidebar.
194252

docs/_snippets/_GCS_authentication_and_bucket.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,46 +6,47 @@ import GCS_create_service_account_a from '@site/static/images/integrations/data-
66
import GCS_create_service_account_2 from '@site/static/images/integrations/data-ingestion/s3/GCS-create-service-account-2.png';
77
import GCS_create_service_account_3 from '@site/static/images/integrations/data-ingestion/s3/GCS-create-service-account-3.png';
88
import GCS_guide_key from '@site/static/images/integrations/data-ingestion/s3/GCS-guide-key.png';
9+
import Image from '@theme/IdealImage';
910

1011
<details>
1112
<summary>Create GCS buckets and an HMAC key</summary>
1213

1314
### ch_bucket_us_east1 {#ch_bucket_us_east1}
1415

15-
<img src={GCS_bucket_1} alt="Creating a GCS bucket in US East 1" />
16+
<Image size="md" img={GCS_bucket_1} alt="Creating a GCS bucket in US East 1" border />
1617

1718
### ch_bucket_us_east4 {#ch_bucket_us_east4}
1819

19-
<img src={GCS_bucket_2} alt="Creating a GCS bucket in US East 4" />
20+
<Image size="md" img={GCS_bucket_2} alt="Creating a GCS bucket in US East 4" border />
2021

2122
### Generate an Access key {#generate-an-access-key}
2223

2324
### Create a service account HMAC key and secret {#create-a-service-account-hmac-key-and-secret}
2425

2526
Open **Cloud Storage > Settings > Interoperability** and either choose an existing **Access key**, or **CREATE A KEY FOR A SERVICE ACCOUNT**. This guide covers the path for creating a new key for a new service account.
2627

27-
<img src={GCS_create_service_account_key} alt="Generating a service account HMAC key in GCS" />
28+
<Image size="md" img={GCS_create_service_account_key} alt="Generating a service account HMAC key in GCS" border />
2829

2930
### Add a new service account {#add-a-new-service-account}
3031

3132
If this is a project with no existing service account, **CREATE NEW ACCOUNT**.
3233

33-
<img src={GCS_create_service_account_0} alt="Adding a new service account in GCS" />
34+
<Image size="md" img={GCS_create_service_account_0} alt="Adding a new service account in GCS" border />
3435

3536
There are three steps to creating the service account, in the first step give the account a meaningful name, ID, and description.
3637

37-
<img src={GCS_create_service_account_a} alt="Defining a new service account name and ID in GCS" />
38+
<Image size="md" img={GCS_create_service_account_a} alt="Defining a new service account name and ID in GCS" border />
3839

3940
In the Interoperability settings dialog the IAM role **Storage Object Admin** role is recommended; select that role in step two.
4041

41-
<img src={GCS_create_service_account_2} alt="Selecting IAM role Storage Object Admin in GCS" />
42+
<Image size="md" img={GCS_create_service_account_2} alt="Selecting IAM role Storage Object Admin in GCS" border />
4243

4344
Step three is optional and not used in this guide. You may allow users to have these privileges based on your policies.
4445

45-
<img src={GCS_create_service_account_3} alt="Configuring additional settings for the new service account in GCS" />
46+
<Image size="md" img={GCS_create_service_account_3} alt="Configuring additional settings for the new service account in GCS" border />
4647

4748
The service account HMAC key will be displayed. Save this information, as it will be used in the ClickHouse configuration.
4849

49-
<img src={GCS_guide_key} alt="Retrieving the generated HMAC key for GCS" />
50+
<Image size="md" img={GCS_guide_key} alt="Retrieving the generated HMAC key for GCS" border />
5051

5152
</details>

docs/_snippets/_S3_authentication_and_bucket.md

Lines changed: 34 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import Image from '@theme/IdealImage';
12
import s3_1 from '@site/static/images/_snippets/s3/s3-1.png';
23
import s3_2 from '@site/static/images/_snippets/s3/s3-2.png';
34
import s3_3 from '@site/static/images/_snippets/s3/s3-3.png';
@@ -27,105 +28,105 @@ In this procedure, we'll be creating a service account user, not a login user.
2728

2829
2. In "users", select **Add users**
2930

30-
<img src={s3_1} alt="create_iam_user_0"/>
31+
<Image size="md" img={s3_1} alt="AWS IAM Management Console - Adding a new user" border force/>
3132

3233
3. Enter the user name and set the credential type to **Access key - Programmatic access** and select **Next: Permissions**
3334

34-
<img src={s3_2} alt="create_iam_user_1"/>
35+
<Image size="md" img={s3_2} alt="Setting user name and access type for IAM user" border force/>
3536

3637
4. Do not add the user to any group; select **Next: Tags**
3738

38-
<img src={s3_3} alt="create_iam_user_2"/>
39+
<Image size="md" img={s3_3} alt="Skipping group assignment for IAM user" border force/>
3940

4041
5. Unless you need to add any tags, select **Next: Review**
4142

42-
<img src={s3_4} alt="create_iam_user_3"/>
43+
<Image size="md" img={s3_4} alt="Skipping tag assignment for IAM user" border force/>
4344

4445
6. Select **Create User**
4546

4647
:::note
4748
The warning message stating that the user has no permissions can be ignored; permissions will be granted on the bucket for the user in the next section
4849
:::
4950

50-
<img src={s3_5} alt="create_iam_user_4"/>
51+
<Image size="md" img={s3_5} alt="Creating the IAM user with no permissions warning" border force/>
5152

5253
7. The user is now created; click on **show** and copy the access and secret keys.
5354
:::note
5455
Save the keys somewhere else; this is the only time that the secret access key will be available.
5556
:::
5657

57-
<img src={s3_6} alt="create_iam_user_5"/>
58+
<Image size="md" img={s3_6} alt="Viewing and copying the IAM user access keys" border force/>
5859

5960
8. Click close, then find the user in the users screen.
6061

61-
<img src={s3_7} alt="create_iam_user_6"/>
62+
<Image size="md" img={s3_7} alt="Finding the newly created IAM user in the users list" border force/>
6263

6364
9. Copy the ARN (Amazon Resource Name) and save it for use when configuring the access policy for the bucket.
6465

65-
<img src={s3_8} alt="create_iam_user_7"/>
66+
<Image size="md" img={s3_8} alt="Copying the ARN of the IAM user" border force/>
6667

6768
### Create an S3 bucket {#create-an-s3-bucket}
6869
1. In the S3 bucket section, select **Create bucket**
6970

70-
<img src={s3_9} alt="create_s3_bucket_0"/>
71+
<Image size="md" img={s3_9} alt="Starting the S3 bucket creation process" border force/>
7172

7273
2. Enter a bucket name, leave other options default
7374
:::note
7475
The bucket name must be unique across AWS, not just the organization, or it will emit an error.
7576
:::
7677
3. Leave `Block all Public Access` enabled; public access is not needed.
7778

78-
<img src={s3_a} alt="create_s3_bucket_2"/>
79+
<Image size="md" img={s3_a} alt="Configuring the S3 bucket settings with public access blocked" border force/>
7980

8081
4. Select **Create Bucket** at the bottom of the page
8182

82-
<img src={s3_b} alt="create_s3_bucket_3"/>
83+
<Image size="md" img={s3_b} alt="Finalizing S3 bucket creation" border force/>
8384

8485
5. Select the link, copy the ARN, and save it for use when configuring the access policy for the bucket.
8586

8687
6. Once the bucket has been created, find the new S3 bucket in the S3 buckets list and select the link
8788

88-
<img src={s3_c} alt="create_s3_bucket_4"/>
89+
<Image size="md" img={s3_c} alt="Finding the newly created S3 bucket in the buckets list" border force/>
8990

9091
7. Select **Create folder**
9192

92-
<img src={s3_d} alt="create_s3_bucket_5"/>
93+
<Image size="md" img={s3_d} alt="Creating a new folder in the S3 bucket" border force/>
9394

9495
8. Enter a folder name that will be the target for the ClickHouse S3 disk and select **Create folder**
9596

96-
<img src={s3_e} alt="create_s3_bucket_6"/>
97+
<Image size="md" img={s3_e} alt="Setting the folder name for ClickHouse S3 disk usage" border force/>
9798

9899
9. The folder should now be visible on the bucket list
99100

100-
<img src={s3_f} alt="create_s3_bucket_7"/>
101+
<Image size="md" img={s3_f} alt="Viewing the newly created folder in the S3 bucket" border force/>
101102

102103
10. Select the checkbox for the new folder and click on **Copy URL** Save the URL copied to be used in the ClickHouse storage configuration in the next section.
103104

104-
<img src={s3_g} alt="create_s3_bucket_8"/>
105+
<Image size="md" img={s3_g} alt="Copying the S3 folder URL for ClickHouse configuration" border force/>
105106

106107
11. Select the **Permissions** tab and click on the **Edit** button in the **Bucket Policy** section
107108

108-
<img src={s3_h} alt="create_s3_bucket_9"/>
109+
<Image size="md" img={s3_h} alt="Accessing the S3 bucket policy configuration" border force/>
109110

110111
12. Add a bucket policy, example below:
111112
```json
112113
{
113-
"Version": "2012-10-17",
114-
"Id": "Policy123456",
115-
"Statement": [
116-
{
117-
"Sid": "abc123",
118-
"Effect": "Allow",
119-
"Principal": {
120-
"AWS": "arn:aws:iam::921234567898:user/mars-s3-user"
121-
},
122-
"Action": "s3:*",
123-
"Resource": [
124-
"arn:aws:s3:::mars-doc-test",
125-
"arn:aws:s3:::mars-doc-test/*"
126-
]
127-
}
128-
]
114+
"Version" : "2012-10-17",
115+
"Id" : "Policy123456",
116+
"Statement" : [
117+
{
118+
"Sid" : "abc123",
119+
"Effect" : "Allow",
120+
"Principal" : {
121+
"AWS" : "arn:aws:iam::921234567898:user/mars-s3-user"
122+
},
123+
"Action" : "s3:*",
124+
"Resource" : [
125+
"arn:aws:s3:::mars-doc-test",
126+
"arn:aws:s3:::mars-doc-test/*"
127+
]
128+
}
129+
]
129130
}
130131
```
131132

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import Image from '@theme/IdealImage';
12
import ip_allow_list_check_list from '@site/static/images/_snippets/ip-allow-list-check-list.png';
23
import ip_allow_list_add_current_ip from '@site/static/images/_snippets/ip-allow-list-add-current-ip.png';
34

@@ -6,10 +7,10 @@ import ip_allow_list_add_current_ip from '@site/static/images/_snippets/ip-allow
67

78
From your ClickHouse Cloud services list choose the service that you will work with and switch to **Settings**. 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 IPs**:
89

9-
<img src={ip_allow_list_check_list} class="image" alt="Check to see if the service allows traffic" />
10+
<Image size="md" img={ip_allow_list_check_list} alt="Check to see if the service allows traffic from your IP address in the IP Access List" border />
1011

1112
Add the individual IP Address, or the range of addresses that need to connect to your ClickHouse Cloud service. Modify the form as you see fit and then **Save**.
1213

13-
<img src={ip_allow_list_add_current_ip} class="image" alt="Add your current IP address" />
14+
<Image size="md" img={ip_allow_list_add_current_ip} alt="Add your current IP address to the IP Access List in ClickHouse Cloud" border />
1415

1516
</details>

docs/_snippets/_clickhouse_mysql_cloud_setup.mdx

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,43 +3,38 @@ import mysql_2 from '@site/static/images/_snippets/mysql2.png';
33
import mysql_3 from '@site/static/images/_snippets/mysql3.png';
44
import mysql_4 from '@site/static/images/_snippets/mysql4.png';
55
import mysql_5 from '@site/static/images/_snippets/mysql5.png';
6+
import Image from '@theme/IdealImage';
67

78
<br/>
89
1. After creating your ClickHouse Cloud Service, on the `Connect your app` screen, select MySQL from the drop down.
910
<br/>
1011

11-
<div class="eighty-percent">
12-
<img src={mysql_1} class="image" alt="Credentials screen - Prompt" />
13-
</div>
12+
<Image size="md" img={mysql_1} alt="ClickHouse Cloud credentials screen showing MySQL interface selection dropdown" border />
1413

1514

1615
2. Toggle the switch to enable the MySQL interface for this specific service. This will expose port `3306` for this service and prompt you with your MySQL connection screen that include your unique MySQL username.
1716

18-
<div class="eighty-percent">
19-
<img src={mysql_2} class="image" alt="Credentials screen - Enabled MySQL" />
20-
</div>
17+
<Image size="md" img={mysql_2} alt="ClickHouse Cloud MySQL interface enabling toggle and connection details" border />
2118
<br/>
2219

2320
Alternatively, in order to enable the MySQL interface for an existing service:
2421

2522
3. Ensure your service is in `Running` state then click on the service you want to enable the MySQL interface for. Select "Connect" from the left menu:
2623

2724
<br/>
28-
<div class="eighty-percent">
29-
<img src={mysql_3} class="image" alt="Connection screen - Prompt MySQL" />
30-
</div>
25+
<Image size="md" img={mysql_3} alt="ClickHouse Cloud service connection screen with Connect option highlighted" border />
3126
<br/>
3227

3328

3429
4. Select MySQL from the `Connect With` drop down.
3530

3631
<br/>
37-
<img src={mysql_4} class="image" alt="Connection screen - Prompt MySQL" />
32+
<Image size="md" img={mysql_4} alt="ClickHouse Cloud connection screen showing MySQL option selection" border />
3833
<br/>
3934

4035
5. Toggle the switch to enable the MySQL interface for this specific service. This will expose port `3306` for this service and prompt you with your MySQL connection screen that include your unique MySQL username.
4136

42-
<img src={mysql_5} class="image" alt="Connection screen - MySQL Enabled" />
37+
<Image size="md" img={mysql_5} alt="ClickHouse Cloud connection screen with MySQL interface enabled showing connection details" border />
4338

4439
## Creating multiple MySQL users in ClickHouse Cloud {#creating-multiple-mysql-users-in-clickhouse-cloud}
4540

0 commit comments

Comments
 (0)