Skip to content

Commit 2a1e90f

Browse files
committed
Update ReadTheDocs configuration for Python version and build process
- Upgraded Python version from 3.9 to 3.12 in the build configuration. - Streamlined the installation of Python requirements by referencing `docs/requirements.txt`. - Enhanced multilingual support with a pre-build job for creating language indices. - Cleaned up comments and structure for clarity in the configuration file.
1 parent b5f4fa2 commit 2a1e90f

1 file changed

Lines changed: 20 additions & 25 deletions

File tree

.readthedocs.yaml

Lines changed: 20 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,36 @@
11
# .readthedocs.yaml
2-
# Read the Docs configuration file
3-
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4-
5-
# Required
62
version: 2
73

8-
# Set the version of Python and other tools you might need
4+
# Set the OS, Python version and other tools
95
build:
106
os: ubuntu-22.04
117
tools:
12-
python: "3.9"
13-
# You can also specify other tool versions:
14-
# nodejs: "16"
15-
# rust: "1.55"
16-
# golang: "1.17"
8+
python: "3.12"
179

1810
# Build documentation in the docs/ directory with Sphinx
1911
sphinx:
20-
configuration: docs/source/conf.py
12+
configuration: docs/source/conf.py
2113

22-
# If using Sphinx, optionally build your docs in additional formats such as PDF
14+
# Optionally build your docs in additional formats
2315
formats:
2416
- pdf
25-
- epub
2617

2718
# Optionally declare the Python requirements required to build your docs
2819
python:
29-
install:
30-
- method: pip
31-
path: .
32-
extra_requirements:
33-
- docs
20+
install:
21+
- requirements: docs/requirements.txt
22+
23+
# Multilingual configuration
24+
sphinx:
25+
configuration: docs/source/conf.py
26+
fail_on_warning: false
3427

35-
languages:
36-
en:
37-
name: English
38-
version: latest
39-
zh_CN:
40-
name: 中文
41-
version: latest
28+
# MultiLanguage documentation with subdirectories approach
29+
build:
30+
os: ubuntu-22.04
31+
tools:
32+
python: "3.12"
33+
jobs:
34+
pre_build:
35+
# Create the language-specific indices
36+
- echo "Creating language indices..."

0 commit comments

Comments
 (0)