From 598b41406c8250a0adbc5d53525c0d8dec4d84ec Mon Sep 17 00:00:00 2001 From: Krystine Sherwin <93062060+KrystalDelusion@users.noreply.github.com> Date: Fri, 21 Mar 2025 10:26:12 +1300 Subject: [PATCH] Docs: Don't force READTHEDOCS on local readthedocs detection should only trigger on actual readthedocs builds. --- docs/source/conf.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 3e6b957f3..ffa6bc9b0 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -18,13 +18,14 @@ html_theme_options: dict[str] = { } # try to fix the readthedocs detection -html_context: dict[str] = { - "READTHEDOCS": True, - "display_github": True, - "github_user": "YosysHQ", - "github_repo": "yosys", - "slug": "yosys", -} +if os.getenv("READTHEDOCS"): + html_context: dict[str] = { + "READTHEDOCS": True, + "display_github": True, + "github_user": "YosysHQ", + "github_repo": "yosys", + "slug": "yosys", + } # override source_branch if not main git_slug = os.getenv("READTHEDOCS_VERSION_NAME")