diff options
author | James R. Barlow <james@purplerock.ca> | 2022-07-18 14:24:02 -0700 |
---|---|---|
committer | James R. Barlow <james@purplerock.ca> | 2022-07-18 14:24:02 -0700 |
commit | fff532a534ad6aed3baeaff1a52fb8dd68b5ef96 (patch) | |
tree | 455084510ba1611038dbfa7186f7b41b5a66e52a | |
parent | c775a2a8db173dd68b91b460487f8bd1a12ca80f (diff) |
docs: setup extensions sooner?
-rw-r--r-- | docs/conf.py | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/docs/conf.py b/docs/conf.py index 70d0363..2833b38 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -21,7 +21,24 @@ try: except ModuleNotFoundError: import tomli as tomllib # type: ignore + +extensions = [ + 'sphinx.ext.autodoc', + 'sphinx.ext.intersphinx', + 'sphinx.ext.autosummary', + 'sphinx.ext.napoleon', + 'sphinx_issues', + 'sphinx_design', + 'IPython.sphinxext.ipython_console_highlighting', + 'IPython.sphinxext.ipython_directive', + 'fix_pybind11_autodoc', +] + on_rtd = os.environ.get('READTHEDOCS') == 'True' + +if on_rtd: + extensions.append('rtds_action') + if on_rtd: github_token = os.environ['GITHUB_TOKEN'] # The name of your GitHub repository @@ -68,23 +85,6 @@ import pikepdf # isort:skip pylint: disable=unused-import # If your documentation needs a minimal Sphinx version, state it here. # needs_sphinx = '1.0' -# Add any Sphinx extension module names here, as strings. They can be -# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom -# ones. -extensions = [ - 'sphinx.ext.autodoc', - 'sphinx.ext.intersphinx', - 'sphinx.ext.autosummary', - 'sphinx.ext.napoleon', - 'sphinx_issues', - 'sphinx_design', - 'IPython.sphinxext.ipython_console_highlighting', - 'IPython.sphinxext.ipython_directive', - 'fix_pybind11_autodoc', -] - -if on_rtd: - extensions.append('rtds_action') issues_github_path = "pikepdf/pikepdf" |