diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6bbae4c..640d367 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -35,3 +35,10 @@ repos: args: [--line-length=79] additional_dependencies: - black + - repo: local + hooks: + - id: linkcheck + entry: sphinx-build -b linkcheck docs/ docs/_build/html/ + name: linkcheck + language: system + files: $(git diff --staged --name-only "*") diff --git a/docs/conf.py b/docs/conf.py index f4c9537..3d6110e 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -134,6 +134,14 @@ "pandas": ("https://pandas.pydata.org/pandas-docs/stable/", None), } +linkcheck_ignore = [ + r".*/_sources/.*/*.txt", +] + +linkcheck_allowed_redirects = [ + r"https://results.pre-commit.ci/latest/github/veit/pyviz-tutorial/main", +] + def setup(app): # from sphinx.ext.autodoc import cut_lines