Skip to content

Commit ac66a0f

Browse files
authored
Update style-guide with how to handle adding new pages from ClickHouse/ClickHouse repo
1 parent 2ae2bf3 commit ac66a0f

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

contribute/style-guide.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ export function Anchor(props) {
206206
```
207207
- Replace `<span id="some-id"></span>` with `Anchor id="some-id"/>`
208208

209-
### Dangling pages
209+
### Floating pages
210210

211211
In order to prevent pages from becoming 'floating' or 'orphaned' it is
212212
necessary that you add a newly created page to `sidebars.js`. We have a [custom
@@ -215,3 +215,28 @@ docusaurus plugin](plugins/checkFloatingPages.js) to catch dangling pages.
215215
If there is some specific reason that you need to bypass this check, you can
216216
add an exception to `floating-pages-exceptions.txt` in the plugins directory.
217217

218+
When adding a new page from the ClickHouse/ClickHouse repo this check will fail
219+
unless the file is in a folder which [`sidebars.js`](https://github.com/ClickHouse/clickhouse-docs/blob/main/sidebars.js)
220+
uses with `type: autogenerated` to generate the navigation items from the markdown
221+
files in the folder.
222+
223+
If you've added a new page on ClickHouse/ClickHouse and this check is failing.
224+
225+
For example:
226+
227+
```text
228+
✅ All markdown files passed frontmatter validation.
229+
Loaded 3 exceptions from /opt/clickhouse-docs/plugins/floating-pages-exceptions.txt
230+
Skipping excepted page: index
231+
Skipping excepted page: integrations/language-clients/java/client-v1
232+
Skipping excepted page: integrations/language-clients/java/jdbc-v1
233+
�[31m1 floating pages found:�[0m
234+
- /opt/clickhouse-docs/docs/operations/query-condition-cache.md
235+
```
236+
237+
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
238+
you can then rerun the docs check on the ClickHouse/ClickHouse repo which
239+
should pass. Finally open another PR on the docs repo again to remove the
240+
file from the exception list and add it to `sidebars.js` in the appropriate
241+
sidebar.
242+

0 commit comments

Comments
 (0)