Open pradyunsg opened 1 year ago
Is there anything blocking changing this? Is it as simple as updating the path you linked:
diff --git a/src/furo/theme/furo/components/edit-this-page.html b/src/furo/theme/furo/components/edit-this-page.html
index c61b17b..e8dc5f7 100644
--- a/src/furo/theme/furo/components/edit-this-page.html
+++ b/src/furo/theme/furo/components/edit-this-page.html
@@ -17,7 +17,7 @@
{% block link_not_available %}
{# Make nice things happen, on Read the Docs #}
{%- if READTHEDOCS and conf_py_path and page_source_suffix and github_user != "None" and github_repo != "None" and github_version and pagename and page_source_suffix %}
- {% set url = "https://github.com/" + github_user + "/" + github_repo + "/edit/" + github_version + conf_py_path + pagename + page_source_suffix %}
+ {% set url = "https://github.com/" + github_user + "/" + github_repo + "/blob/" + github_version + conf_py_path + pagename + page_source_suffix %}
{{ furo_edit_button(url) }}
{%- endif -%}
{% endblock %}
That is not gonna work since blob links are not what we wanna link to and those pages also don’t have an edit button. What we need to change to is linked inOP. It’s a matter of someone investigating and making the relevant changes.
What's happening?
The current logic for computing the GitHub URLs in Furo, when on RTD is:
https://github.com/pradyunsg/furo/blob/490527b2aef00b1198770c3389a1979911ee1fcb/src/furo/theme/furo/components/edit-this-page.html#L24
This differs from sphinx-rtd-theme (https://github.com/readthedocs/sphinx_rtd_theme/blob/9899ee4ee2f547f81e51297dc12317f018e62fdd/sphinx_rtd_theme/breadcrumbs.html#L39) and should be fixed to align with that.
Reproducer
Expectation
The generated URL should point to the source ref.
Code of Conduct