From 7e13611bc56423df9c24fa0361bcf481022e0ff3 Mon Sep 17 00:00:00 2001 From: Laurens Valk Date: Fri, 23 Jul 2021 12:34:10 +0200 Subject: [PATCH] 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. --- doc/common/conf.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/common/conf.py b/doc/common/conf.py index acc6f3d..018beb7 100644 --- a/doc/common/conf.py +++ b/doc/common/conf.py @@ -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 ------------------------------------------------