Rework index page to take less vertical space

This commit is contained in:
Rapptz
2020-12-19 00:48:35 -05:00
parent 17b49c5a46
commit 2a6ea3532b
3 changed files with 94 additions and 22 deletions

View File

@ -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'