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. -#}