aboutsummaryrefslogtreecommitdiff
path: root/docs/conf.py
diff options
context:
space:
mode:
authorRapptz <[email protected]>2020-12-19 00:48:35 -0500
committerRapptz <[email protected]>2020-12-19 00:48:35 -0500
commit2a6ea3532b3ec3d75e560fe1a9fe76b29566108b (patch)
treee6b56c3ebd890a24180824bc6c9b45b6cb0a8a44 /docs/conf.py
parent[commands] Make documentation use new attributetable (diff)
downloaddiscord.py-2a6ea3532b3ec3d75e560fe1a9fe76b29566108b.tar.xz
discord.py-2a6ea3532b3ec3d75e560fe1a9fe76b29566108b.zip
Rework index page to take less vertical space
Diffstat (limited to 'docs/conf.py')
-rw-r--r--docs/conf.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/docs/conf.py b/docs/conf.py
index 40edda29..d42dc2a7 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -40,6 +40,7 @@ extensions = [
'details',
'exception_hierarchy',
'attributetable',
+ 'resourcelinks',
]
autodoc_member_order = 'bysource'
@@ -91,6 +92,9 @@ with open('../discord/__init__.py') as f:
# The full version, including alpha/beta/rc tags.
release = version
+# This assumes a tag is available for final releases
+branch = 'master' if version.endswith('a') else version
+
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
@@ -152,6 +156,13 @@ html_context = {
],
}
+resource_links = {
+ 'discord': 'https://discord.gg/r3sSKJJ',
+ 'issues': 'https://github.com/Rapptz/discord.py/issues',
+ 'discussions': 'https://github.com/Rapptz/discord.py/discussions',
+ 'examples': 'https://github.com/Rapptz/discord.py/tree/%s/examples' % branch,
+}
+
# 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.
@@ -337,3 +348,4 @@ def setup(app):
if app.config.language == 'ja':
app.config.intersphinx_mapping['py'] = ('https://docs.python.org/ja/3', None)
app.config.html_context['discord_invite'] = 'https://discord.gg/nXzj3dg'
+ app.config.resource_links['discord'] = 'https://discord.gg/nXzj3dg'