Skip to content

Commit fd83875

Browse files
authored
Merge pull request #935 from readthedocs/search-hide-edit-links
Search page: don't show "edit on" links
2 parents aa71fd6 + ecc58ad commit fd83875

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

sphinx_rtd_theme/breadcrumbs.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
{% set display_gitlab = True %}
2525
{% endif %}
2626

27+
{% set display_vcs_links = display_vcs_links if display_vcs_links is defined else True %}
28+
2729
<div role="navigation" aria-label="breadcrumbs navigation">
2830

2931
<ul class="wy-breadcrumbs">
@@ -36,8 +38,8 @@
3638
{% endblock %}
3739
{% block breadcrumbs_aside %}
3840
<li class="wy-breadcrumbs-aside">
39-
{% if hasdoc(pagename) %}
40-
{% if display_github %}
41+
{% if hasdoc(pagename) and display_vcs_links %}
42+
{% if display_github %}
4143
{% if check_meta and 'github_url' in meta %}
4244
<!-- User defined GitHub URL -->
4345
<a href="{{ meta['github_url'] }}" class="fa fa-github"> {{ _('Edit on GitHub') }}</a>

sphinx_rtd_theme/search.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#}
1010
{%- extends "layout.html" %}
1111
{% set title = _('Search') %}
12+
{% set display_vcs_links = False %}
1213
{%- block scripts %}
1314
{{ super() }}
1415
<script type="text/javascript" src="{{ pathto('_static/searchtools.js', 1) }}"></script>

0 commit comments

Comments
 (0)