Skip to content

Commit 2a6341c

Browse files
committed
merged with main and replaced img with Image
2 parents 36eac8c + 4c4bca8 commit 2a6341c

File tree

5,866 files changed

+528495
-27744
lines changed

Some content is hidden

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

5,866 files changed

+528495
-27744
lines changed
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

.gitignore

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ yarn.lock
2929
yarn.error-log
3030
.comments
3131
yarn-error.log
32+
frontmatter-validation-errors.log
3233

3334
# Output files used by scripts to verify links
3435
sidebar_links.txt
@@ -53,8 +54,12 @@ docs/whats-new/changelog/index.md
5354
.aspell.en.prepl
5455
*.md.bak
5556

56-
# Don't ignore generated table of contents files
57-
!toc.json
5857
**.translated
5958
**.translate
6059
ClickHouse/
60+
61+
62+
# Ignore table of contents files
63+
docs/cloud/reference/release-notes-index.md
64+
docs/whats-new/changelog/index.md
65+
docs/cloud/manage/api/api-reference-index.md

clickhouseapi.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,10 @@ function groupEndpointsByPrefix(spec) {
4040
}
4141

4242
function generateDocusaurusMarkdown(spec, groupedEndpoints, prefix) {
43-
let markdownContent = `---\nsidebar_label: ${prefix.charAt(0).toUpperCase() + prefix.slice(1)}\n`;
44-
markdownContent += `title: ${prefix.charAt(0).toUpperCase() + prefix.slice(1)}\n---\n`;
43+
let markdownContent = `---\nsidebar_label: '${prefix.charAt(0).toUpperCase() + prefix.slice(1)}'\n`;
44+
markdownContent += `title: '${prefix.charAt(0).toUpperCase() + prefix.slice(1)}'\n`;
45+
markdownContent += `slug: /cloud/manage/api/${prefix}-api-reference\n`;
46+
markdownContent += `description: 'Cloud API reference documentation for ${prefix}'\n---\n`;
4547

4648
for (const path in groupedEndpoints) {
4749
for (const method in groupedEndpoints[path]) {

contribute/contrib-writing-guide.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,7 @@ slug: /integrations/sql-clients/clickhouse-client-local
265265
sidebar_label: clickhouse-client
266266
title: clickhouse-client and clickhouse-local
267267
---
268+
268269
import Tabs from '@theme/Tabs';
269270
import TabItem from '@theme/TabItem';
270271

contribute/style-guide.md

Lines changed: 103 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:
@@ -92,6 +117,38 @@ Code blocks:
92117
- Have a title (optional) such as 'Query' or 'Response'
93118
- Use language `response` if it is for the result of a query.
94119

120+
### Highlighting
121+
122+
You can highlight lines in a code block using the following keywords:
123+
124+
- `highlight-next-line`
125+
- `highlight-start`
126+
- `highlight-end`
127+
128+
These keywords should be added as comments in the codeblock with the appropriate
129+
escape symbol for the codeblock language.
130+
131+
For example, if the codeblock is SQL:
132+
133+
```text
134+
SELECT UserID, count(UserID) AS Count
135+
-- highlight-next-line
136+
FROM mv_hits_URL_UserID
137+
WHERE URL = 'http://public_search'
138+
GROUP BY UserID
139+
ORDER BY Count DESC
140+
LIMIT 10;
141+
```
142+
143+
If the codeblock is a response:
144+
145+
```text
146+
10 rows in set. Elapsed: 0.026 sec.
147+
# highlight-next-line
148+
Processed 335.87 thousand rows,
149+
13.54 MB (12.91 million rows/s., 520.38 MB/s.)
150+
```
151+
95152
### Associated markdown rule or CI check
96153

97154
- [`MD040` enforces that codeblocks have a language specified](/scripts/.markdownlint-cli2.yaml)
@@ -159,4 +216,37 @@ export function Anchor(props) {
159216
```
160217
- Replace `<span id="some-id"></span>` with `Anchor id="some-id"/>`
161218

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.
162252

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
---
2+
description: 'Changelog for 2025'
3+
note: 'This file is autogenerated by the yarn new-build'
24
slug: /whats-new/changelog/
35
sidebar_position: 2
4-
sidebar_label: 2025
5-
title: 2025 Changelog
6-
note: This file is autogenerated by the yarn new-build
6+
sidebar_label: '2025'
7+
title: '2025 Changelog'
78
---
89

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
import GCS_bucket_1 from '@site/static/images/integrations/data-ingestion/s3/GCS-bucket-1.png';
32
import GCS_bucket_2 from '@site/static/images/integrations/data-ingestion/s3/GCS-bucket-2.png';
43
import GCS_create_service_account_key from '@site/static/images/integrations/data-ingestion/s3/GCS-create-a-service-account-key.png';
@@ -7,46 +6,47 @@ import GCS_create_service_account_a from '@site/static/images/integrations/data-
76
import GCS_create_service_account_2 from '@site/static/images/integrations/data-ingestion/s3/GCS-create-service-account-2.png';
87
import GCS_create_service_account_3 from '@site/static/images/integrations/data-ingestion/s3/GCS-create-service-account-3.png';
98
import GCS_guide_key from '@site/static/images/integrations/data-ingestion/s3/GCS-guide-key.png';
9+
import Image from '@theme/IdealImage';
1010

1111
<details>
1212
<summary>Create GCS buckets and an HMAC key</summary>
1313

1414
### ch_bucket_us_east1 {#ch_bucket_us_east1}
1515

16-
<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 />
1717

1818
### ch_bucket_us_east4 {#ch_bucket_us_east4}
1919

20-
<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 />
2121

2222
### 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

2626
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.
2727

28-
<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 />
2929

3030
### Add a new service account {#add-a-new-service-account}
3131

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

34-
<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 />
3535

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

38-
<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 />
3939

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

42-
<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 />
4343

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

46-
<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 />
4747

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

50-
<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 />
5151

5252
</details>

0 commit comments

Comments
 (0)