-
Notifications
You must be signed in to change notification settings - Fork 20
/
breadcrumbs.html
28 lines (26 loc) · 1.55 KB
/
breadcrumbs.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
{%- extends "sphinx_rtd_theme/breadcrumbs.html" %}
{% set display_vcs_links = display_vcs_links if display_vcs_links is defined else True %}
{% block breadcrumbs_aside %}
<li class="wy-breadcrumbs-aside">
{% 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>
{% else %}
{% if 'examples/index' in pagename %}
<a href="https://github.com/pyro-ppl/funsor/blob/master/examples/README.rst" class="fa fa-github"> {{ _('Edit on GitHub') }}</a>
{% elif 'examples/' in pagename %}
<a href="https://github.com/pyro-ppl/funsor/blob/master/{{ pagename }}.py" class="fa fa-github"> {{ _('Edit on GitHub') }}</a>
{% else %}
<a href="https://{{ github_host|default("github.com") }}/{{ github_user }}/{{ github_repo }}/{{ theme_vcs_pageview_mode|default("blob") }}/{{ github_version }}{{ conf_py_path }}{{ pagename }}{{ suffix }}" class="fa fa-github"> {{ _('Edit on GitHub') }}</a>
{% endif %}
{% endif %}
{% elif show_source and source_url_prefix %}
<a href="{{ source_url_prefix }}{{ pagename }}{{ suffix }}">{{ _('View page source') }}</a>
{% elif show_source and has_source and sourcename %}
<a href="{{ pathto('_sources/' + sourcename, true)|e }}" rel="nofollow"> {{ _('View page source') }}</a>
{% endif %}
{% endif %}
</li>
{% endblock %}