From 442de9f8f574939dfcd7ef74b9765934ae373514 Mon Sep 17 00:00:00 2001 From: Tony Meyer Date: Fri, 4 Oct 2024 22:58:30 +1300 Subject: [PATCH 1/2] Set the READTHEDOCS context variable, per the instructions. --- docs/custom_conf.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/custom_conf.py b/docs/custom_conf.py index fb14823a1..20654de0a 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. From a7f8856b1ac2c8d56e3e9f92a63d8a8cac1c7288 Mon Sep 17 00:00:00 2001 From: Tony Meyer Date: Sun, 6 Oct 2024 19:50:17 +1300 Subject: [PATCH 2/2] Style fix. --- docs/custom_conf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/custom_conf.py b/docs/custom_conf.py index 20654de0a..fbe2a7350 100644 --- a/docs/custom_conf.py +++ b/docs/custom_conf.py @@ -139,8 +139,8 @@ '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 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.