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

enable edit-this-page button on RTD #305

Merged
merged 1 commit into from
Dec 12, 2023
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions docs/customization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,7 @@ Configuration Options

This is the url segment that is concatenated with :themeconf:`repo_url` to point readers to the document's
source file. This is typically in the form of ``"blob/<branch name>/<docs source folder>"``.
Defaults to a blank string (which disables the edit icon). This is disabled for builds on
ReadTheDocs as they implement their own mechanism based on the repository's branch or tagged
commit.
Defaults to a blank string (which disables the edit icon).

.. themeconf:: features

Expand Down
2 changes: 1 addition & 1 deletion sphinx_immaterial/nav_adapt.py
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@ def _html_page_context(
}
repo_url: Optional[str] = theme_options.get("repo_url")
edit_uri: Optional[str] = theme_options.get("edit_uri")
if repo_url and edit_uri and not READTHEDOCS and "hide-edit-link" not in meta:
if repo_url and edit_uri and "hide-edit-link" not in meta:
page["edit_url"] = "/".join(
[
repo_url.rstrip("/"),
Expand Down