aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorRapptz <[email protected]>2019-06-28 21:04:18 -0400
committerRapptz <[email protected]>2019-06-28 21:04:43 -0400
commitacda8088035ac094b293a4dc58879e7810036215 (patch)
tree37281a76ebd06ec41729e3146e23832fccaefa78 /docs
parentDowngrade to Sphinx 1.8.5 (diff)
downloaddiscord.py-acda8088035ac094b293a4dc58879e7810036215.tar.xz
discord.py-acda8088035ac094b293a4dc58879e7810036215.zip
Make the generated index page more useful for Ctrl + F.
Diffstat (limited to 'docs')
-rw-r--r--docs/_templates/genindex.html18
-rw-r--r--docs/index.rst2
2 files changed, 18 insertions, 2 deletions
diff --git a/docs/_templates/genindex.html b/docs/_templates/genindex.html
new file mode 100644
index 00000000..e16eb36b
--- /dev/null
+++ b/docs/_templates/genindex.html
@@ -0,0 +1,18 @@
+{%- extends "basic/genindex.html" %}
+
+{% block body %}
+ {{ super() }}
+ <!-- Inject some JavaScript to convert the index names into something useful. -->
+ <script>
+ let elements = document.querySelectorAll("table.indextable a");
+
+ // this is pretty finicky but it should work.
+ for(let el of elements) {
+ let key = el.getAttribute('href').split('#', 2)[1]
+ if(el.textContent.endsWith('method)') || el.textContent.indexOf('()') !== -1) {
+ key = key + '()'
+ }
+ el.textContent = key;
+ }
+ </script>
+{% endblock %}
diff --git a/docs/index.rst b/docs/index.rst
index 77463d9f..99868756 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -56,6 +56,4 @@ Additional Information
If you still can't find what you're looking for, try in one of the following pages:
* :ref:`genindex`
-* :ref:`modindex`
* :ref:`search`
-