Skip to content

Commit

Permalink
Add README.
Browse files Browse the repository at this point in the history
  • Loading branch information
agoessling committed Jul 8, 2021
1 parent 7b9029f commit dbfae56
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# rules_sphinx

Rules for building [Sphinx](https://www.sphinx-doc.org/en/master/) documentation with
[Bazel](https://bazel.build/).

## WORKSPACE
To incorporate `rules_sphinx` into your project at the following to your `WORKSPACE` file.

```Starlark
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
name = "rules_sphinx",
# See release page for latest version url and sha.
)
```

## Rules

* `sphinx_html_gen` - Generates HTML documentation into `[NAME]_html` directory.
* `sphinx_view` - Given an HTML generator, create target to launch viewer.
* `sphinx_html` - A macro that creates a `sphinx_html_gen` and an associated `sphinx_view` with the
`[NAME].view` verb.

## Examples

To build the test documentation use:

```Shell
bazel build @rules_sphinx//test:test_docs
```

To build and view test documentation use:

```Shell
bazel run @rules_sphinx//test:test_docs.view
```

0 comments on commit dbfae56

Please sign in to comment.