Skip to content

Commit

Permalink
🔧 Add linkcheck to pre-commit hook
Browse files Browse the repository at this point in the history
  • Loading branch information
veit committed Jul 2, 2024
1 parent 79ec3b6 commit 9477dc5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 "*")
8 changes: 8 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9477dc5

Please sign in to comment.