forked from EMI-Group/evox
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.readthedocs.yaml
More file actions
43 lines (39 loc) · 1.35 KB
/
Copy path.readthedocs.yaml
File metadata and controls
43 lines (39 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
# Required
version: 2
# Set the version of Python and other tools you might need
build:
os: ubuntu-lts-latest
tools:
python: "3.11"
apt_packages:
- pandoc
jobs:
pre_build:
# If language is not "en", override the tutorials with the language-specific ones
# Note: readthedocs uses dashes and lowercase for language codes, e.g., "zh-cn" for Chinese
# However, the locale directory uses underscores and uppercase, e.g., "zh_CN"
- |
if [ "$READTHEDOCS_LANGUAGE" != "en" ]; then
echo "Overriding tutorials with language-specific ones"
echo "READTHEDOCS_LANGUAGE: $READTHEDOCS_LANGUAGE"
# set the language code to the one used in the locale directory
if [ "$READTHEDOCS_LANGUAGE" = "zh-cn" ]; then
LANGUAGE_CODE="zh_CN"
else
LANGUAGE_CODE="$READTHEDOCS_LANGUAGE"
fi
cp -r docs/source/locale/${LANGUAGE_CODE}/tutorial docs/source
fi
# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/source/conf.py
# Optionally declare the Python requirements required to build your docs
python:
install:
- method: pip
path: .
extra_requirements:
- docs