aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRapptz <[email protected]>2019-06-29 02:34:11 -0400
committerRapptz <[email protected]>2019-06-29 02:34:11 -0400
commitc26797d808b213a902ab425b307bc0d109c13ef4 (patch)
tree328ce0c044634e5cfc6371f1132aa82f00e1fe27
parentDisable RTD search. (diff)
downloaddiscord.py-c26797d808b213a902ab425b307bc0d109c13ef4.tar.xz
discord.py-c26797d808b213a902ab425b307bc0d109c13ef4.zip
Proper RTD detection.
-rw-r--r--docs/_templates/layout.html2
-rw-r--r--docs/conf.py4
2 files changed, 5 insertions, 1 deletions
diff --git a/docs/_templates/layout.html b/docs/_templates/layout.html
index 412deb20..00686bd7 100644
--- a/docs/_templates/layout.html
+++ b/docs/_templates/layout.html
@@ -27,7 +27,7 @@
</div>
{% endif %}
- {%- if readthedocs %}
+ {%- if ON_READTHEDOCS %}
<script>
if (typeof READTHEDOCS_DATA !== 'undefined') {
if (!READTHEDOCS_DATA.features) {
diff --git a/docs/conf.py b/docs/conf.py
index 5f0e7592..e5054a15 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -142,6 +142,10 @@ html_experimental_html5_writer = True
# a list of builtin themes.
html_theme = 'basic'
+html_context = {
+ 'ON_READTHEDOCS': bool(os.environ.get('READTHEDOCS'))
+}
+
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.