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/i18nfolder). There is no need to update files in thei18nfolder 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
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 linksWithout this, images and links in custom components will 404 in production even though they work in mint dev.
- For documentation PRs always begin the PR title with 'Docs: ' + title