diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 00000000..d5555beb --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,18 @@ +version: 2 + +build: + os: ubuntu-22.04 + tools: + python: "3.11" + jobs: + post_create_environment: + - pip install pdm + - pdm config python.use_venv false + - pdm config check_update false + post_install: + - pdm sync --no-self --dev --group=doc + pre_build: + - python -m sphinx -b linkcheck -D docs/source/ $READTHEDOCS_OUTPUT/linkcheck + +sphinx: + configuration: docs/source/conf.py diff --git a/docs/source/conf.py b/docs/source/conf.py index 1cfe82af..2597fd22 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -52,7 +52,7 @@ exclude_patterns = ["_include", "_extensions"] -# -- sphinx.ext.autodoc configuration ------------------------------------------- +# -- sphinx.ext.autodoc configuration ---------------------------------------- # https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html autoclass_content = "both" @@ -92,7 +92,7 @@ } -# -- sphinx.ext.napoleon configuration ------------------------------------------- +# -- sphinx.ext.napoleon configuration --------------------------------------- # https://www.sphinx-doc.org/en/master/usage/extensions/napoleon.html napoleon_numpy_docstring = False @@ -131,9 +131,14 @@ html_theme = "sphinx_rtd_theme" html_static_path = [] -# -- sphinx-rtd-theme configuration ------------------------------------- +# -- sphinx-rtd-theme configuration ------------------------------------------ # https://sphinx-rtd-theme.readthedocs.io/en/stable/configuring.html html_theme_options = { "navigation_depth": -1, # Unlimited } + +# -- Options for the linkcheck builder --------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-the-linkcheck-builder + +linkcheck_timeout = 1 diff --git a/pyproject.toml b/pyproject.toml index 035244ed..23bf1005 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -116,6 +116,7 @@ exclude = [ ".github/", ".vscode/", ".bumpversion.cfg", + ".readthedocs.yaml", ] [tool.hatch.build.targets.wheel]