This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is the Chinese translation of the CodeIgniter 4 User Guide, built using Sphinx documentation system. The project translates English CodeIgniter 4 documentation into Chinese using ReStructuredText (.rst) format.
# Install dependencies (requires Python 3.7+)
pip install -r requirements.txt
# Build HTML documentation
make html
# Build PDF documentation
make latexpdf
# Clean build artifacts
make clean# Build and run in Docker container
docker build -t codeigniter4-user-guide .
docker run --rm -v $(pwd):/app -w /app codeigniter4-user-guide make htmlsource/: All ReStructuredText documentation filesconf.py: Sphinx configuration with Chinese language settingsindex.rst: Master document tree defining site structure- Topic directories:
tutorial/,installation/,concepts/,database/,libraries/,helpers/ _static/: CSS, JavaScript, images, and other assets_templates/: Custom Sphinx templates
build/: Generated documentation outputhtml/: Web-ready HTML filesdoctrees/: Sphinx build cache
- Sphinx 5.3.0+: Static site generator optimized for technical documentation
- ReStructuredText: Markup format for all content files
- sphinxcontrib-phpdomain: PHP syntax highlighting and cross-referencing
- sphinx-rtd-theme: Read the Docs theme
- jieba: Chinese text segmentation for search functionality
The project uses a standard Sphinx Makefile workflow:
- RST files in
source/are processed by Sphinx - Chinese language configuration in
source/conf.py - Output generated to
build/html/orbuild/latex/ - GitHub Actions automates builds and deploys to GitHub Pages
When editing documentation:
- Follow Chinese copywriting standards defined in
translation-guide.md - Maintain consistency with existing terminology
- Preserve RST markup structure and Sphinx directives
- Test builds locally before committing:
make html - Use signed commits as required by project workflow
GitHub Actions automatically:
- Builds HTML and PDF versions on master branch pushes
- Deploys HTML to GitHub Pages
- Uses LaTeX/XeTeX for proper Chinese PDF generation
- Validates all builds before deployment
- Edit RST files in appropriate
source/subdirectories - Run
make htmlto build and preview locally inbuild/html/ - Check
build/html/index.htmlin browser to verify changes - For PDF testing, run
make latexpdf(requires LaTeX installation) - Commit with signed-off commits following project conventions
- Documentation pages:
source/**/*.rst - Configuration:
source/conf.py - Static assets:
source/_static/**/* - Templates:
source/_templates/**/* - Build output:
build/**/*(git-ignored)
For CodeIgniter documentation translation tasks, use the codeigniter-translator agent which specializes in:
- Translating CodeIgniter 4 documentation from English to Chinese
- Preserving ReStructuredText formatting and Sphinx directives
- Maintaining technical terminology consistency
- Following Chinese copywriting standards