8000 ccgo/docs at master Β· zhlinh/ccgo Β· GitHub
[go: up one dir, main page]

Skip to content

Latest commit

Β 

History

History

docs

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

README.md

CCGO Documentation

This directory contains the source files for CCGO documentation, built with MkDocs and Material for MkDocs.

Documentation Structure

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

Building Documentation Locally

Prerequisites

# Install Python 3.8+
python3 --version

# Install dependencies
pip3 install -r docs/requirements.txt

Serve Documentation

# From project root
mkdocs serve

# Open http://127.0.0.1:8000 in your browser

Build Static Site

# Build to site/ directory
mkdocs build

# Build with strict mode (fail on warnings)
mkdocs build --strict

Multi-language Support

Documentation supports English and Chinese:

  • English files: filename.md
  • Chinese files: filename.zh.md

The language switcher appears in the site header.

Adding a New Language

  1. Update mkdocs.yml:

    plugins:
      - i18n:
          languages:
            - locale: fr
              name: FranΓ§ais
              build: true
  2. Create translated files with .fr.md suffix

  3. Add translations to nav_translations section

Writing Documentation

Style Guide

  • Use clear, concise language
  • Include code examples for complex concepts
  • Add command output where helpful
  • Use admonitions for important notes
  • Cross-link related documentation

Code Blocks

Use fenced code blocks with language specifiers:

```bash ccgo build android --arch arm64-v8a ```

```toml [package] name = "mylib" version = "1.0.0" ```

Admonitions

!!! note
    This is a note.

!!! warning
    This is a warning.

!!! tip
    This is a tip.

Tabbed Content

=== "Linux"
    Linux-specific content

=== "macOS"
    macOS-specific content

=== "Windows"
    Windows-specific content

Publishing

ReadTheDocs

Documentation is automatically built and published to ReadTheDocs on every push to main branch.

Manual Deployment

# Build and deploy to GitHub Pages
mkdocs gh-deploy

Contributing

When contributing documentation:

  1. Follow the existing structure and style
  2. Test locally with mkdocs serve
  3. Check for broken links with mkdocs build --strict
  4. Update both English and Chinese versions
  5. Submit a pull request

See Contributing Guide for details.

Troubleshooting

Build Errors

# Clear build cache
rm -rf site/

# Rebuild
mkdocs build --strict

Live Reload Not Working

# Try different port
mkdocs serve --dev-addr 127.0.0.1:8001

Missing Dependencies

# Reinstall dependencies
pip3 install -r docs/requirements.txt --upgrade

Resources

0