-
Notifications
You must be signed in to change notification settings - Fork 321
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
Fix edit button on Read the Docs with stable branch builds #668
Labels
bug
Something isn't working
Comments
This was referenced Mar 13, 2024
Closed
Julian
added a commit
to bowtie-json-schema/bowtie
that referenced
this issue
Mar 13, 2024
See https://pradyunsg.me/furo/customisation/edit-button/ Evades the (currently open) pradyunsg/furo#668. Closes: #979 Refs: pradyunsg/furo#668 Refs: readthedocs/readthedocs.org#1820
1 task
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. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What's happening?
The current logic for computing the GitHub URLs in Furo, when on RTD is:
furo/src/furo/theme/furo/components/edit-this-page.html
Line 24 in 490527b
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
The text was updated successfully, but these errors were encountered: