Files
xc-llm-kunlun/docs/README.md

58 lines
1.2 KiB
Markdown
Raw Permalink Normal View History

2025-12-10 12:05:39 +08:00
## 🚀 Installation
```bash
uv venv myenv --python 3.12 --seed
source myenv/bin/activate
# Step 1: Enter the docs directory
2025-12-10 12:05:39 +08:00
cd docs
# Step 2: Install dependencies (using uv)
2025-12-10 12:05:39 +08:00
uv pip install -r requirements-docs.txt
# Install sphinx-autobuild (if not in requirements file)
2025-12-10 12:05:39 +08:00
uv pip install sphinx-autobuild
# Run from the docs directory:
2025-12-10 12:05:39 +08:00
sphinx-autobuild ./source ./_build/html --port 8000
# Step 1: Clean up old files
2025-12-10 12:05:39 +08:00
make clean
# Step 2: Build HTML
2025-12-10 12:05:39 +08:00
make html
# Step 3: Local preview
2025-12-10 12:05:39 +08:00
python -m http.server -d _build/html/
Browser access: http://localhost:8000
2025-12-10 12:05:39 +08:00
🌍 Internationalization
Internationalization translation process (taking Chinese as an example)
2025-12-10 12:05:39 +08:00
# Step 1: Extract translatable text (generate .pot)
2025-12-10 12:05:39 +08:00
sphinx-build -b gettext source _build/gettext
# Step 2: Generate/update Chinese .po file
2025-12-10 12:05:39 +08:00
sphinx-intl update -p _build/gettext -l zh_CN
# Step 3: Manually translate .po file
# Use a text editor to open source/locale/zh_CN/LC_MESSAGES/*.po
# Fill in the Chinese translation in msgstr ""
2025-12-10 12:05:39 +08:00
# Step 4: Compile and build Chinese documentation
2025-12-10 12:05:39 +08:00
make intl
# Step 5: View the effect
2025-12-10 12:05:39 +08:00
python -m http.server -d _build/html
Browser access:
2025-12-10 12:05:39 +08:00
English version: http://localhost:8000
Chinese version: http://localhost:8000/zh-cn
2025-12-10 12:05:39 +08:00
```