Skip to content

Commit bb80731

Browse files
committed
use a tweaked Trio sphinx template
1 parent 2e06a6a commit bb80731

File tree

2 files changed

+26
-2
lines changed

2 files changed

+26
-2
lines changed

docs/source/_templates/layout.html

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{#
2+
https://stackoverflow.com/questions/25243482/how-to-add-sphinx-generated-index-to-the-sidebar-when-using-read-the-docs-theme
3+
#}
4+
{% extends "!layout.html" %}
5+
6+
{% block sidebartitle %}
7+
<a href="{{ pathto(master_doc) }}" class="icon icon-home"> {{ project }}
8+
<img class="logo" src="{{ pathto('_static/' + logo, 1) }}" />
9+
{%- set nav_version = version %}
10+
{% if READTHEDOCS and current_version %}
11+
{%- set nav_version = current_version %}
12+
{% endif %}
13+
{# don't show the version on RTD if it's the default #}
14+
{% if nav_version != 'latest' %}
15+
<div class="trio-version">{{ nav_version }}</div>
16+
{% endif %}
17+
</a>
18+
19+
{% include "searchbox.html" %}
20+
21+
<p class="trio-help-hint">Need help? <a
22+
href="https://gitter.im/python-trio/general">Live chat</a>, <a
23+
href="https://trio.discourse.group">forum</a>, <a
24+
href="https://stackoverflow.com/questions/ask?tags=python+python-trio">StackOverflow</a>.</p>
25+
{% endblock %}

docs/source/conf.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
autodoc_member_order = "bysource"
6868

6969
# Add any paths that contain templates here, relative to this directory.
70-
templates_path = []
70+
templates_path = ['_templates']
7171

7272
# The suffix(es) of source filenames.
7373
# You can specify multiple suffix as a list of string:
@@ -95,7 +95,6 @@
9595

9696
html_favicon = "_static/favicon-32.png"
9797
html_logo = "../../logo/wordmark-transparent.svg"
98-
# & down below in html_theme_options we set logo_only=True
9998

10099
# The language for content autogenerated by Sphinx. Refer to documentation
101100
# for a list of supported languages.

0 commit comments

Comments
 (0)