doc/common/conf: Default to main on RTD.

It would be nicer to specify this in the .readthedocs.yaml file, but this appears to not to be supported.
This commit is contained in:
Laurens Valk
2021-07-23 12:34:10 +02:00
parent 78feab8949
commit 7e13611bc5
+4
View File
@@ -42,6 +42,10 @@ from pybricks._common import Speaker # noqa E402
# this line of code grabbed from docs.readthedocs.org
ON_RTD = os.environ.get('READTHEDOCS', None) == 'True'
# Since tags cannot be passed via SPHINXOPTS on read the docs, add it manually.
if ON_RTD:
tags.add('main')
_pyproject = toml.load(os.path.join(TOP_DIR, 'pyproject.toml'))
# -- General configuration ------------------------------------------------