diff --git a/sphinx_rtd_theme/breadcrumbs.html b/sphinx_rtd_theme/breadcrumbs.html index bd45b6d7c..be819b84c 100644 --- a/sphinx_rtd_theme/breadcrumbs.html +++ b/sphinx_rtd_theme/breadcrumbs.html @@ -16,7 +16,18 @@ {%- set display_gitlab = True %} {%- endif %} -{%- set display_vcs_links = display_vcs_links if display_vcs_links is defined else True %} +{%- set sourcelinks = True %} +{%- if html_show_sourcelink is false %} + {#- https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-html_show_sourcelink -#} + {%- set sourcelinks = False %} +{%- elif hasdoc(pagename) is false %} + {#- disable for autogenerated pages -#} + {%- set sourcelinks = False %} +{%- elif pagename == 'search' %} + {#- explicitly disable for search page -#} + {#- https://github.com/readthedocs/sphinx_rtd_theme/issues/934 -#} + {%- set sourcelinks = False %} +{%- endif %} {#- Translators: This is an ARIA section label for page links, including previous/next page link and links to GitHub/GitLab/etc. -#}
@@ -30,7 +41,7 @@ {%- endblock %} {%- block breadcrumbs_aside %}
  • - {%- if hasdoc(pagename) and display_vcs_links %} + {%- if sourcelinks %} {%- if display_github %} {%- if check_meta and 'github_url' in meta %} diff --git a/sphinx_rtd_theme/search.html b/sphinx_rtd_theme/search.html index 4c282db1f..0b440275a 100644 --- a/sphinx_rtd_theme/search.html +++ b/sphinx_rtd_theme/search.html @@ -9,7 +9,6 @@ #} {%- extends "layout.html" %} {% set title = _('Search') %} -{% set display_vcs_links = False %} {%- block scripts %} {{ super() }}