From 3ac948780d9bce6db358b8854c1091ab7db69a74 Mon Sep 17 00:00:00 2001 From: Chris Beaven Date: Tue, 7 May 2024 09:20:45 +1200 Subject: [PATCH 1/2] Remove github edit link in non-trunk versions of docs --- docs/conf.py | 6 +++++- pyproject.toml | 2 +- src/towncrier/newsfragments/+5082632d.misc.rst | 1 + 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 src/towncrier/newsfragments/+5082632d.misc.rst diff --git a/docs/conf.py b/docs/conf.py index ad06fee2..7196f550 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -29,6 +29,8 @@ # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. +import os + from datetime import date from towncrier import __version__ as towncrier_version @@ -90,7 +92,9 @@ # further. For a list of options available for each theme, see the # documentation. # -# html_theme_options = {} +if os.environ.get("READTHEDOCS_VERSION_NAME", "trunk") != "trunk": + # Remove the "Edit on GitHub" link for non-trunk versions of the docs + html_theme_options = {"top_of_page_buttons": []} # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, diff --git a/pyproject.toml b/pyproject.toml index 236e09cb..245e7dd4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -40,7 +40,7 @@ dependencies = [ dev = [ "packaging", "sphinx >= 5", - "furo", + "furo >= 2024.05.06", "twisted", "nox", ] diff --git a/src/towncrier/newsfragments/+5082632d.misc.rst b/src/towncrier/newsfragments/+5082632d.misc.rst new file mode 100644 index 00000000..d1b07d7b --- /dev/null +++ b/src/towncrier/newsfragments/+5082632d.misc.rst @@ -0,0 +1 @@ +Remove github edit link in non-trunk versions of docs From a363b2a1877698d83983cc7068fd165089ac6d2b Mon Sep 17 00:00:00 2001 From: Chris Beaven Date: Tue, 7 May 2024 09:29:20 +1200 Subject: [PATCH 2/2] Rename newsfragment --- src/towncrier/newsfragments/{+5082632d.misc.rst => 596.misc.rst} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/towncrier/newsfragments/{+5082632d.misc.rst => 596.misc.rst} (100%) diff --git a/src/towncrier/newsfragments/+5082632d.misc.rst b/src/towncrier/newsfragments/596.misc.rst similarity index 100% rename from src/towncrier/newsfragments/+5082632d.misc.rst rename to src/towncrier/newsfragments/596.misc.rst