This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Kube-OVN documentation site — a bilingual (Chinese/English) MkDocs Material project with multi-version support via Mike. Deployed to GitHub Pages at https://kubeovn.github.io/docs/.
# Install dependencies
pip install -r docs/requirements.txt
# Local development server (http://localhost:8000)
mkdocs serve
# Build and validate (strict mode, used in CI)
mkdocs build -s
# Markdown linting (matches CI)
npx markdownlint-cli "**/*.md" --disable MD013 MD033 MD045 MD024 MD041 MD029 MD051 MD046 MD007 -r markdownlint-rule-search-replace@1.0.9
# Check for Chinese punctuation in English docs
python3 scripts/check-chinese-punctuation.py
# Auto-fix Chinese punctuation in English docs
python3 scripts/check-chinese-punctuation.py --fix
# Cherry-pick commits to release branches
./hack/cherry-pick.sh 'v1.14,v1.13'- Chinese (default):
filename.md - English:
filename.en.md - Every document should have both Chinese and English versions side by side in the same directory.
- The i18n plugin (
mkdocs-static-i18n) handles language switching. UI translations are defined inmkdocs.ymlunderplugins.i18n.languages.
These rules are enforced by CI linting:
- Chinese docs: use Chinese punctuation (。,?!;:)
- English docs: use English punctuation only (CI runs
scripts/check-chinese-punctuation.pyto enforce this) - Mandatory spacing: insert a space between Chinese characters and English/numbers (e.g.,
安装 Kube-OVNnot安装 Kube-OVN). This is enforced by markdownlint search-replace rules in.markdownlint.json.
- Always specify language:
```yaml,```bash, etc. - Commands with output: prefix executed commands with
#to distinguish from output - Commands without output: no
#prefix needed
- Internal links: use relative
.mdpaths (e.g.,./prepare.md) - External links: add
{: target="_blank" }attribute
- Separate logical blocks (headings, text, code) with exactly one blank line
- Sentences in Chinese docs end with
。; example introductions use:
docs/ # All documentation content
advance/ # Advanced features
guide/ # User guide
kubevirt/ # KubeVirt integration
ops/ # Operations & maintenance
reference/ # Technical reference
start/ # Getting started
vpc/ # VPC networking
static/ # Images and assets
overrides/ # MkDocs Material theme overrides (main.html, contact.md)
scripts/ # CI scripts (Chinese punctuation checker)
hack/ # Utility scripts (cherry-pick, gh-pages squash)
mkdocs.yml # Main site configuration (nav, plugins, i18n, theme)
PRs run two checks (.github/workflows/lint.yml):
- Markdown lint — markdownlint-cli with custom search-replace rules for Chinese-English spacing
- Chinese punctuation check — ensures
.en.mdfiles have no Chinese punctuation - Build validation —
mkdocs build -smust succeed
Pushes to main/master deploy via Mike with version tags (.github/workflows/ci.yml).
- Each Kube-OVN release has a corresponding git branch (
v1.10throughv1.15,masterfor dev) - Mike manages version deployment to
gh-pages - Release process documented in README.md — involves branch creation and Mike config changes in
mkdocs.yml hack/squash.shcompressesgh-pageshistory to control repo size