Skip to content

Commit

Permalink
Remove github edit link in non-trunk versions of docs (#596)
Browse files Browse the repository at this point in the history
* Remove github edit link in non-trunk versions of docs

* Rename newsfragment
  • Loading branch information
SmileyChris committed May 6, 2024
1 parent db10a4d commit 3427a19
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ dependencies = [
dev = [
"packaging",
"sphinx >= 5",
"furo",
"furo >= 2024.05.06",
"twisted",
"nox",
]
Expand Down
1 change: 1 addition & 0 deletions src/towncrier/newsfragments/596.misc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove github edit link in non-trunk versions of docs

0 comments on commit 3427a19

Please sign in to comment.