This directory contains the source files for CCGO documentation, built with MkDocs and Material for MkDocs.
docs/
βββ index.md # Home page (English)
βββ index.zh.md # Home page (Chinese)
βββ getting-started/ # Getting started guides
β βββ installation.md
β βββ installation.zh.md
β βββ quickstart.md
β βββ quickstart.zh.md
β βββ configuration.md
β βββ project-structure.md
βββ platforms/ # Platform-specific guides
β βββ index.md
β βββ android.md
β βββ ios.md
β βββ macos.md
β βββ windows.md
β βββ linux.md
β βββ ohos.md
β βββ kmp.md
βββ features/ # Feature documentation
β βββ build-system.md
β βββ dependency-management.md
β βββ publishing.md
β βββ docker-builds.md
β βββ version-management.md
β βββ git-integration.md
βββ reference/ # Reference documentation
β βββ cli.md
β βββ ccgo-toml.md
β βββ cmake.md
β βββ gradle-plugins.md
βββ development/ # Development guides
β βββ contributing.md
β βββ contributing.zh.md
β βββ roadmap.md
β βββ roadmap.zh.md
β βββ changelog.md
β βββ architecture.md
βββ requirements.txt # Python dependencies
# Install Python 3.8+
python3 --version
# Install dependencies
pip3 install -r docs/requirements.txt# From project root
mkdocs serve
# Open http://127.0.0.1:8000 in your browser# Build to site/ directory
mkdocs build
# Build with strict mode (fail on warnings)
mkdocs build --strictDocumentation supports English and Chinese:
- English files:
filename.md - Chinese files:
filename.zh.md
The language switcher appears in the site header.
-
Update
mkdocs.yml:plugins: - i18n: languages: - locale: fr name: FranΓ§ais build: true
-
Create translated files with
.fr.mdsuffix -
Add translations to
nav_translationssection
- Use clear, concise language
- Include code examples for complex concepts
- Add command output where helpful
- Use admonitions for important notes
- Cross-link related documentation
Use fenced code blocks with language specifiers:
```bash ccgo build android --arch arm64-v8a ```
```toml [package] name = "mylib" version = "1.0.0" ```
!!! note
This is a note.
!!! warning
This is a warning.
!!! tip
This is a tip.=== "Linux"
Linux-specific content
=== "macOS"
macOS-specific content
=== "Windows"
Windows-specific contentDocumentation is automatically built and published to ReadTheDocs on every push to main branch.
# Build and deploy to GitHub Pages
mkdocs gh-deployWhen contributing documentation:
- Follow the existing structure and style
- Test locally with
mkdocs serve - Check for broken links with
mkdocs build --strict - Update both English and Chinese versions
- Submit a pull request
See Contributing Guide for details.
# Clear build cache
rm -rf site/
# Rebuild
mkdocs build --strict# Try different port
mkdocs serve --dev-addr 127.0.0.1:8001# Reinstall dependencies
pip3 install -r docs/requirements.txt --upgrade