diff options
Diffstat (limited to 'docs/conf.py')
-rw-r--r-- | docs/conf.py | 113 |
1 files changed, 30 insertions, 83 deletions
diff --git a/docs/conf.py b/docs/conf.py index de9fe3f8..65078c96 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,81 +1,6 @@ -import subprocess -import sys -import os +extensions = ['sphinx.ext.autodoc', 'jaraco.packaging.sphinx', 'rst.linker'] - -# hack to run the bootstrap script so that jaraco.packaging.sphinx -# can invoke setup.py -'READTHEDOCS' in os.environ and subprocess.check_call( - [sys.executable, '-m', 'bootstrap'], - cwd=os.path.join(os.path.dirname(__file__), os.path.pardir), -) - -# -- Project information ----------------------------------------------------- - -github_url = 'https://github.com' -github_sponsors_url = f'{github_url}/sponsors' - -# -- General configuration -- - -extensions = [ - 'sphinx.ext.extlinks', # allows to create custom roles easily - 'sphinx.ext.intersphinx', # allows interlinking external docs sites - 'jaraco.packaging.sphinx', - 'rst.linker', -] - -# Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates'] - -# The master toctree document. -master_doc = 'index' - -# List of directories, relative to source directory, that shouldn't be searched -# for source files. -exclude_trees = [] - -# The name of the Pygments (syntax highlighting) style to use. -pygments_style = 'sphinx' - -# -- Options for extlinks extension --------------------------------------- -extlinks = { - 'user': (f'{github_sponsors_url}/%s', '@'), # noqa: WPS323 -} - -# -- Options for HTML output -- - -# The theme to use for HTML and HTML Help pages. Major themes that come with -# Sphinx are currently 'default' and 'sphinxdoc'. -html_theme = 'nature' - -# Add any paths that contain custom themes here, relative to this directory. -html_theme_path = ['_theme'] - -# If true, SmartyPants will be used to convert quotes and dashes to -# typographically correct entities. -html_use_smartypants = True - -# Custom sidebar templates, maps document names to template names. -html_sidebars = { - 'index': [ - 'relations.html', 'sourcelink.html', 'indexsidebar.html', - 'searchbox.html']} - -# If false, no module index is generated. -html_use_modindex = False - -# If false, no index is generated. -html_use_index = False - -# -- Options for LaTeX output -- - -# Grouping the document tree into LaTeX files. List of tuples -# (source start file, target name, title, author, -# documentclass [howto/manual]). -latex_documents = [( - 'index', 'Setuptools.tex', 'Setuptools Documentation', - 'The fellowship of the packaging', 'manual', -)] +master_doc = "index" link_files = { '../CHANGES.rst': dict( @@ -148,10 +73,38 @@ link_files = { ), } +intersphinx_mapping = { + 'pypa-build': ('https://pypa-build.readthedocs.io/en/latest/', None) +} + +# Add support for linking usernames +github_url = 'https://github.com' +github_sponsors_url = f'{github_url}/sponsors' +extlinks = { + 'user': (f'{github_sponsors_url}/%s', '@'), # noqa: WPS323 +} +extensions += ['sphinx.ext.extlinks', 'sphinx.ext.intersphinx'] # Be strict about any broken references: nitpicky = True +# Ref: https://github.com/python-attrs/attrs/pull/571/files\ +# #diff-85987f48f1258d9ee486e3191495582dR82 +default_role = 'any' + +# Custom sidebar templates, maps document names to template names. +html_theme = 'alabaster' +templates_path = ['_templates'] +html_sidebars = {'index': ['tidelift-sidebar.html']} + +# Add support for inline tabs +extensions += ['sphinx_inline_tabs'] + +## Support for distutils + +# allow interlinking external docs sites +extensions += ['sphinx.ext.intersphinx'], + # Ref: https://stackoverflow.com/a/30624034/595220 nitpick_ignore = [ ('c:func', 'SHGetSpecialFolderPath'), # ref to MS docs @@ -188,12 +141,6 @@ nitpick_ignore = [ ('py:mod', 'docutils'), # there's no Sphinx site documenting this ] - -# Ref: https://github.com/python-attrs/attrs/pull/571/files\ -# #diff-85987f48f1258d9ee486e3191495582dR82 -default_role = 'any' - - # Allow linking objects on other Sphinx sites seamlessly: intersphinx_mapping = { 'python': ('https://docs.python.org/3', None), |