https://github.com/thclark/pre-commit-sphinx
A pre-commit hook that will fail if documentation (eg for readthedocs.io) can't be built using sphinx
https://github.com/thclark/pre-commit-sphinx
Last synced: 8 months ago
JSON representation
A pre-commit hook that will fail if documentation (eg for readthedocs.io) can't be built using sphinx
- Host: GitHub
- URL: https://github.com/thclark/pre-commit-sphinx
- Owner: thclark
- License: mit
- Created: 2020-06-19T07:49:26.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-08-13T13:00:21.000Z (almost 6 years ago)
- Last Synced: 2025-07-06T14:42:24.428Z (11 months ago)
- Language: Python
- Size: 11.7 KB
- Stars: 3
- Watchers: 1
- Forks: 15
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pre-commit-sphinx
A pre-commit hook that will fail if documentation (eg for [readthedocs.io](https://www.readthedocs.io)) can't be built using sphinx
Using [pre-commit](https://pre-commit.com/#new-hooks)
## build_docs
Builds documentation using sphinx, returns PASSED to pre-config if the documentation compiles (even with warnings)
Use in your `.pre-commit-config.yaml` file like:
```yaml
- repo: https://github.com/thclark/pre-commit-sphinx
rev: 0.0.1
hooks:
- id: build-docs
args: ['--cache-dir', 'docs/doctrees', '--html-dir', 'docs/html', '--source-dir', 'docs/source']
language_version: python3
```