Skip to content

Commit 2b12b2f

Browse files
ckreibichawelzel
authored andcommitted
Fix Github edit links in top-right of HTML pages
These links 404'd because they omitted the file suffix, and they didn't really link to anything editable, just the raw file. --- In this case, "suffix" was used which is set by the readthedocs theme in older versions [1]. Seem good to replace with page_source_suffix. [1] readthedocs/sphinx_rtd_theme#1104
1 parent f5c61d8 commit 2b12b2f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/_templates/breadcrumbs.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
{% if pagename != "search" %}
66
{% if display_github %}
77
{% if github_version == "master" %}
8-
<a href="https://{{ github_host|default("github.com") }}/{{ github_user }}/{{ github_repo }}/blob/{{ github_version }}{{ conf_py_path }}{{ pagename }}{{ suffix }}" class="fa fa-github"> {{ _('Edit on GitHub') }}</a>
8+
<a href="https://{{ github_host|default("github.com") }}/{{ github_user }}/{{ github_repo }}/edit/{{ github_version }}{{ conf_py_path }}{{ pagename }}{{ page_source_suffix }}" class="fa fa-github"> {{ _('Edit on GitHub') }}</a>
99
{% endif %}
1010
{% elif show_source and has_source and sourcename %}
1111
<a href="{{ pathto('_sources/' + sourcename, true)|e }}" rel="nofollow"> {{ _('View page source') }}</a>

0 commit comments

Comments
 (0)