Skip to content

Latest commit

 

History

History
28 lines (19 loc) · 1.65 KB

File metadata and controls

28 lines (19 loc) · 1.65 KB

ClickHouse documentation

The ClickHouse docs are stored in /docs relative to the repository root. The documentation site at clickhouse.com/docs is hosted using the Mintlify documentation platform.

When making documentation updates, always follow these rules:

  • Make updates only to the english documentation in /docs (ignore the /i18n folder). There is no need to update files in the i18n folder as a separate agent will handle the translation.
  • Documentation inside of {/*AUTOGENERATED_START*/} and {/*AUTOGENERATED_END*/} tags is generated from ClickHouse system tables. It should not be edited directly, but rather the source file should be updated:
    • /src/Functions

Custom component basePath gotcha

The production site is served at clickhouse.com/docs, so Mintlify runs with a /docs basePath. Mintlify handles this automatically for standard MDX content, but custom JSX components in .mdx files must prepend the basePath to any absolute asset paths manually.

Use this pattern at the top of every custom component that references images or links:

const assetBase = typeof window !== 'undefined' && window.location.pathname.startsWith('/docs') ? '/docs' : '';
// then use: `${assetBase}/images/foo.png`  instead of  `/images/foo.png`

const withBase = (p) => p && p.startsWith('/') ? assetBase + p : p;
// then use: withBase(href)  instead of  href  for internal links

Without this, images and links in custom components will 404 in production even though they work in mint dev.

PR instructions

  • For documentation PRs always begin the PR title with 'Docs: ' + title