diff options
| author | Jason R. Coombs <jaraco@jaraco.com> | 2020-12-20 14:53:33 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-20 14:53:33 -0500 |
| commit | 957b7a19dee67181406fa28c15964bcf8aa532b4 (patch) | |
| tree | c42a81d3ae1b67383ba240c8fc05b27e8126de36 /docs/conf.py | |
| parent | 30b66d8ddde14ecbf0ae90966042d8d31fc680c8 (diff) | |
| parent | e52ace421bdf5bf9b236c05af924501e061a7f3c (diff) | |
| download | python-setuptools-git-957b7a19dee67181406fa28c15964bcf8aa532b4.tar.gz | |
Merge pull request #2486 from pypa/feature/skeleton
Adopt jaraco/skeleton
Diffstat (limited to 'docs/conf.py')
| -rw-r--r-- | docs/conf.py | 93 |
1 files changed, 21 insertions, 72 deletions
diff --git a/docs/conf.py b/docs/conf.py index 982f5e62..9b17cd41 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,80 +1,14 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + import subprocess import sys import os -# 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 - '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 +extensions = ['sphinx.ext.autodoc', 'jaraco.packaging.sphinx', 'rst.linker'] -# -- 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 +82,25 @@ link_files = { } +# 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), +) + + +# 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'] + # Be strict about any broken references: nitpicky = True - # Ref: https://github.com/python-attrs/attrs/pull/571/files\ # #diff-85987f48f1258d9ee486e3191495582dR82 default_role = 'any' |
