Skip to content

Commit 1e2c700

Browse files
committed
Consolidate docs into one Sphinx project with language subdirectories
Adopt WebRunner's docs layout: a single Sphinx project under docs/source/ with per-language subdirectories (Eng/, Zh-TW/, Zh-CN/) and a language-neutral API/ tree. The top-level index.rst is a slim hero with four toctrees pointing at chapter sub-indexes (eng_index, zh_tw_index, zh_cn_index, api_index); each sub-index has chapter sections that toctree to the chapter docs. Cross-language navigation now works through normal Sphinx toctrees inside the same build — relative ../html-zh-TW/ links and per- language RTD projects are no longer needed. Drop the per-language .readthedocs.zh-*.yaml files, drop the source.zh-TW/ and source.zh-CN/ source trees, drop the per-language conf.py + index, and simplify make.bat / Makefile to a single html target. Single API tree built once from English autodoc avoids the duplicate object descriptions warnings the three-tree layout produced.
1 parent 5bf51c3 commit 1e2c700

96 files changed

Lines changed: 930 additions & 1813 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.readthedocs.yaml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
# .readthedocs.yaml
2-
# Read the Docs configuration file for the English ("fileautomation") project.
3-
# Sibling files .readthedocs.zh-TW.yaml and .readthedocs.zh-CN.yaml configure
4-
# the two translation projects. Wire each translation project to its own YAML
5-
# in the RTD project admin (Settings → Default settings → Path), and link the
6-
# three projects via the main project's Translations tab.
2+
# Read the Docs configuration file. The single Sphinx project under
3+
# docs/source/ builds all three languages into one site (subdirectories
4+
# Eng/, Zh-TW/, Zh-CN/, and API/) — cross-language navigation works through
5+
# normal Sphinx toctrees, with no per-language project required.
76
# See https://docs.readthedocs.io/en/stable/config-file/v2.html
8-
# https://docs.readthedocs.io/en/stable/localization.html
97

108
# Required
119
version: 2
@@ -16,7 +14,7 @@ build:
1614
tools:
1715
python: "3.11"
1816

19-
# Build the English documentation in docs/source with Sphinx.
17+
# Build the documentation in docs/source/ with Sphinx.
2018
sphinx:
2119
configuration: docs/source/conf.py
2220

.readthedocs.zh-CN.yaml

Lines changed: 0 additions & 22 deletions
This file was deleted.

.readthedocs.zh-TW.yaml

Lines changed: 0 additions & 22 deletions
This file was deleted.

docs/Makefile

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,13 @@ SPHINXBUILD ?= sphinx-build
44
SOURCEDIR = source
55
BUILDDIR = _build
66

7-
.PHONY: help html clean html-zh-TW html-zh-CN html-all
7+
.PHONY: help html clean
88

99
help:
1010
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS)
1111

1212
html:
1313
@$(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS)
1414

15-
html-zh-TW:
16-
@$(SPHINXBUILD) -b html source.zh-TW "$(BUILDDIR)/html-zh-TW" $(SPHINXOPTS)
17-
18-
html-zh-CN:
19-
@$(SPHINXBUILD) -b html source.zh-CN "$(BUILDDIR)/html-zh-CN" $(SPHINXOPTS)
20-
21-
html-all: html html-zh-TW html-zh-CN
22-
2315
clean:
2416
@$(SPHINXBUILD) -M clean "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS)

docs/make.bat

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,27 +18,9 @@ if errorlevel 9009 (
1818
exit /b 1
1919
)
2020

21-
if "%1" == "html-zh-TW" goto build-zh-TW
22-
if "%1" == "html-zh-CN" goto build-zh-CN
23-
if "%1" == "html-all" goto build-all
24-
2521
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
2622
goto end
2723

28-
:build-zh-TW
29-
%SPHINXBUILD% -b html source.zh-TW %BUILDDIR%\html-zh-TW %SPHINXOPTS% %O%
30-
goto end
31-
32-
:build-zh-CN
33-
%SPHINXBUILD% -b html source.zh-CN %BUILDDIR%\html-zh-CN %SPHINXOPTS% %O%
34-
goto end
35-
36-
:build-all
37-
%SPHINXBUILD% -M html %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
38-
%SPHINXBUILD% -b html source.zh-TW %BUILDDIR%\html-zh-TW %SPHINXOPTS% %O%
39-
%SPHINXBUILD% -b html source.zh-CN %BUILDDIR%\html-zh-CN %SPHINXOPTS% %O%
40-
goto end
41-
4224
:help
4325
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
4426

docs/source.zh-CN/api/local.rst

Lines changed: 0 additions & 47 deletions
This file was deleted.

docs/source.zh-CN/api/notify.rst

Lines changed: 0 additions & 8 deletions
This file was deleted.

docs/source.zh-CN/api/progress.rst

Lines changed: 0 additions & 11 deletions
This file was deleted.

docs/source.zh-CN/api/project.rst

Lines changed: 0 additions & 8 deletions
This file was deleted.

docs/source.zh-CN/api/remote.rst

Lines changed: 0 additions & 173 deletions
This file was deleted.

0 commit comments

Comments
 (0)