|
1 | 1 | # ClickHouse docs style guide |
2 | 2 |
|
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. |
6 | 6 |
|
7 | 7 | ## YAML front matter |
8 | 8 |
|
9 | | -Begin every new markdown document with YAML front-matter: |
| 9 | +Begin every new Markdown document with YAML front-matter: |
10 | 10 |
|
11 | 11 | ```markdown |
12 | 12 | --- |
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' |
15 | 15 | 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'] |
18 | 18 | --- |
19 | 19 | ``` |
20 | 20 |
|
| 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 | + |
21 | 36 | ## Explicit header tags |
22 | 37 |
|
23 | 38 | Due to the way our translation system works, it is necessary to add an explicit |
@@ -191,4 +206,12 @@ export function Anchor(props) { |
191 | 206 | ``` |
192 | 207 | - Replace `<span id="some-id"></span>` with `Anchor id="some-id"/>` |
193 | 208 |
|
| 209 | +### Dangling pages |
| 210 | + |
| 211 | +In order to prevent pages from becoming 'floating' or 'orphaned' it is |
| 212 | +necessary that you add a newly created page to `sidebars.js`. We have a [custom |
| 213 | +docusaurus plugin](plugins/checkFloatingPages.js) to catch dangling pages. |
| 214 | + |
| 215 | +If there is some specific reason that you need to bypass this check, you can |
| 216 | +add an exception to `floating-pages-exceptions.txt` in the plugins directory. |
194 | 217 |
|
0 commit comments