Skip to content

Commit

Permalink
Merge pull request #935 from readthedocs/search-hide-edit-links
Browse files Browse the repository at this point in the history
Search page: don't show "edit on" links
  • Loading branch information
stsewd committed Jun 22, 2020
2 parents aa71fd6 + ecc58ad commit fd83875
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions sphinx_rtd_theme/breadcrumbs.html
Expand Up @@ -24,6 +24,8 @@
{% set display_gitlab = True %}
{% endif %}

{% set display_vcs_links = display_vcs_links if display_vcs_links is defined else True %}

<div role="navigation" aria-label="breadcrumbs navigation">

<ul class="wy-breadcrumbs">
Expand All @@ -36,8 +38,8 @@
{% endblock %}
{% block breadcrumbs_aside %}
<li class="wy-breadcrumbs-aside">
{% if hasdoc(pagename) %}
{% if display_github %}
{% if hasdoc(pagename) and display_vcs_links %}
{% if display_github %}
{% if check_meta and 'github_url' in meta %}
<!-- User defined GitHub URL -->
<a href="{{ meta['github_url'] }}" class="fa fa-github"> {{ _('Edit on GitHub') }}</a>
Expand Down
1 change: 1 addition & 0 deletions sphinx_rtd_theme/search.html
Expand Up @@ -9,6 +9,7 @@
#}
{%- extends "layout.html" %}
{% set title = _('Search') %}
{% set display_vcs_links = False %}
{%- block scripts %}
{{ super() }}
<script type="text/javascript" src="{{ pathto('_static/searchtools.js', 1) }}"></script>
Expand Down

0 comments on commit fd83875

Please sign in to comment.