Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove github edit link in non-trunk versions of docs #596

Merged
merged 2 commits into from
May 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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