use env to control the language of doc (#24) (#25)

pull/28/head
ver217 2021-11-15 16:53:56 +08:00 committed by GitHub
parent 9942fd5bfa
commit 2b05de4c64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 26 additions and 24 deletions

View File

@ -24,6 +24,8 @@ author = 'HPC-AI Technology Inc.'
# The full version, including alpha/beta/rc tags
release = '0.0.1'
if 'SPHINX_LANG' in os.environ:
root_doc = f'index_{os.environ["SPHINX_LANG"]}'
# -- General configuration ---------------------------------------------------
# Add any Sphinx extension module names here, as strings. They can be

View File

@ -3,27 +3,27 @@
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
夸父AI系统Colossal-AI开发文档
Colossal-AI documentation
======================================
.. toctree::
:maxdepth: 1
:caption: 快速上手指南
:caption: GETTING STARTED
installation_zh.md
run_demo_zh.md
installation.md
run_demo.md
.. toctree::
:maxdepth: 1
:caption: 个性化您的训练
:caption: CUSTOMIZE YOUR TRAINING
parallelization_zh.md
model_zh.md
trainer_engine_zh.md
amp_zh.md
zero_zh.md
add_your_parallel_zh.md
config_zh.md
parallelization.md
model.md
trainer_engine.md
amp.md
zero.md
add_your_parallel.md
config.md

View File

@ -3,27 +3,27 @@
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Colossal-AI documentation
夸父AI系统Colossal-AI开发文档
======================================
.. toctree::
:maxdepth: 1
:caption: GETTING STARTED
:caption: 快速上手指南
installation.md
run_demo.md
installation_zh.md
run_demo_zh.md
.. toctree::
:maxdepth: 1
:caption: CUSTOMIZE YOUR TRAINING
:caption: 个性化您的训练
parallelization.md
model.md
trainer_engine.md
amp.md
zero.md
add_your_parallel.md
config.md
parallelization_zh.md
model_zh.md
trainer_engine_zh.md
amp_zh.md
zero_zh.md
add_your_parallel_zh.md
config_zh.md