Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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: 26 days ago
JSON representation

A pre-commit hook that will fail if documentation (eg for readthedocs.io) can't be built using sphinx

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
```