Skip to content

Commit

Permalink
enable edit-this-page button on RTD (#305)
Browse files Browse the repository at this point in the history
resolves #304
  • Loading branch information
2bndy5 committed Dec 12, 2023
1 parent 1e813b6 commit 7bb6c48
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
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

0 comments on commit 7bb6c48

Please sign in to comment.