# Contributing to ClickHouse Documentation ## Why Do You Need to Document ClickHouse The main reason is that ClickHouse is an open source project, and if you don't write the docs, nobody does. "Incomplete or Confusing Documentation" is the top complaint about open source software by the results of a [Github Open Source Survey](http://opensourcesurvey.org/2017/) of 2017. Documentation is highly valued but often overlooked. One of the most important contributions someone can make to an open source repository is a documentation update. Many developers can say that the code is the best docs by itself, and they are right. But, ClickHouse is not a project for C++ developers. Most of its users don't know C++, and they can't understand the code quickly. ClickHouse is large enough to absorb almost any change without a noticeable trace. Nobody will find your very useful function, or an important setting, or a very informative new column in a system table if it is not referenced in the documentation. If you want to help ClickHouse with documentation you can face, for example, the following questions: - "I don't know how to write." We have prepared some [recommendations](#what-to-write) for you. - "I know what I want to write, but I don't know how to contribute to docs." Here are some [tips](#how-to-contribute). Writing the docs is extremely useful for project's users and developers, and grows your karma. **Contents** - [What is the ClickHouse Documentation](#clickhouse-docs) - [How to Contribute to ClickHouse Documentation](#how-to-contribute) - [Markdown Dialect Cheatsheet](#markdown-cheatsheet) - [Adding a New File](#adding-a-new-file) - [Adding a New Language](#adding-a-new-language) - [How to Write Content for ClickHouse Documentation](#what-to-write) - [Documentation for Different Audience](#target-audience) - [Common Recommendations](#common-recommendations) - [Description Templates](#templates) - [How to Build Documentation](#how-to-build-docs) ## What is the ClickHouse Documentation The documentation contains information about all the aspects of the ClickHouse lifecycle: developing, testing, installing, operating, and using. The base language of the documentation is English. The English version is the most actual. All other languages are supported as much as they can by contributors from different countries. At the moment, [documentation](https://clickhouse.com/docs) exists in English, Russian, and Chinese. We store the reference documentation besides the ClickHouse source code in the [GitHub repository](https://github.com/ClickHouse/ClickHouse/tree/master/docs), and user guides in a separate repo [Clickhouse/clickhouse-docs](https://github.com/ClickHouse/clickhouse-docs). To get the latter launch the `get-clickhouse-docs.sh` script. Each language lies in the corresponding folder. Files that are not translated from English are symbolic links to the English ones. ## How to Contribute to ClickHouse Documentation You can contribute to the documentation in many ways, for example: - Fork the ClickHouse and ClickHouse-docs repositories, edit, commit, push, and open a pull request. Add the `pr-documentation` label to this pull request for proper automatic checks applying. If you do not have permission to add labels, then the reviewer of your PR will add it. - Open a required file in the ClickHouse repository and edit it from the GitHub web interface. You can do it on GitHub, or on the [ClickHouse Documentation](https://clickhouse.com/docs/en/) site. Each page of ClickHouse Documentation site contains an "Edit this page" (🖋) element in the upper right corner. Clicking this symbol, you get to the ClickHouse docs file opened for editing. When you are saving a file, GitHub opens a pull-request for your contribution. Add the `documentation` label to this pull request for proper automatic checks applying. If you have no permissions for adding labels, the reviewer of your PR adds it. Contribute all new information in English language. Other languages are translations from English. ### Markdown Dialect Cheatsheet - Headings: Place them on a separate line and start with `# `, `## ` or `### `. Use the [Title Case](https://titlecase.com/) for them. Example: ```text # The First Obligatory Title on a Page. ``` - Bold text: `**asterisks**` or `__underlines__`. - Links: `[link text](uri)`. Examples: - External link: `[ClickHouse repo](https://github.com/ClickHouse/ClickHouse)` - Cross link: `[How to build docs](tools/README.md)` - Images: `![Exclamation sign](uri)`. You can refer to local images as well as remote in internet. - Lists: Lists can be of two types: - `- unordered`: Each item starts from the `-`. - `1. ordered`: Each item starts from the number. A list must be separated from the text by an empty line. Nested lists must be indented with 4 spaces. - Inline code: `` `in backticks` ``. - Multiline code blocks:
```lang_name
code
lines
```
- Note:
```text
!!! info "Header"
4 spaces indented text.
```
- Warning:
```text
!!! warning "Header"
4 spaces indented text.
```
- Text hidden behind a cut (single sting that opens on click):
```text