Skip to content

Commit 7ca37ba

Browse files
author
Gyan Ranjan Panda
committed
Fix sidebar home button link (Issue #248)
Signed-off-by: Gyan Ranjan Panda <gyanranjanpanda@gmail.com>
1 parent 4ba4bc6 commit 7ca37ba

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

docs/source/_templates/layout.html

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,35 @@
11
{% extends "!layout.html" %}
22

3+
{%- block sidebartitle %}
4+
5+
{# the logo helper function was removed in Sphinx 6 and deprecated since Sphinx 4 #}
6+
{# the master_doc variable was renamed to root_doc in Sphinx 4 (master_doc still exists in later Sphinx versions) #}
7+
{%- set _logo_url = logo_url|default(pathto('_static/' + (logo or ""), 1)) %}
8+
{%- set _root_doc = root_doc|default(master_doc) %}
9+
<a href="https://aboutcode.org" class="icon icon-home">
10+
{% if not theme_logo_only %}{{ project }}{% endif %}
11+
{%- if logo or logo_url %}
12+
<img src="{{ _logo_url }}" class="logo" alt="{{ _('Logo') }}"/>
13+
{%- endif %}
14+
</a>
15+
16+
{%- if READTHEDOCS or DEBUG %}
17+
{%- if theme_version_selector or theme_language_selector %}
18+
<div class="switch-menus">
19+
<div class="version-switch"></div>
20+
<div class="language-switch"></div>
21+
</div>
22+
{%- endif %}
23+
{%- endif %}
24+
25+
{%- include "searchbox.html" %}
26+
27+
{%- endblock %}
28+
329
{% block menu %}
430
{{ super() }}
531
<div class="toc-index-div">
632
<a href="{{pathto('genindex.html', 1)}}" class="reference internal toc-index">Index</a>
733
</div>
834
{% endblock %}
35+

0 commit comments

Comments
 (0)