diff --git a/docs/custom_conf.py b/docs/custom_conf.py index fb14823a1..fbe2a7350 100644 --- a/docs/custom_conf.py +++ b/docs/custom_conf.py @@ -13,6 +13,7 @@ # limitations under the License. import datetime +import os import pathlib import sys @@ -137,6 +138,9 @@ # Valid options: none, prev, next, both 'sequential_nav': 'none', } +# Addons-by-default, see: https://about.readthedocs.com/blog/2024/07/addons-by-default/ +if os.environ.get('READTHEDOCS', '') == 'True': + html_context['READTHEDOCS'] = True # If your project is on documentation.ubuntu.com, specify the project # slug (for example, "lxd") here.