Skip to content

Commit

Permalink
doc: socdoc: document new sphinx_extra_config parameter
Browse files Browse the repository at this point in the history
This allows for appending additional configuration to `conf.py`.

Signed-off-by: Sean Cross <[email protected]>
  • Loading branch information
xobs committed Jul 24, 2020
1 parent dd36646 commit 29b2baf
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions doc/socdoc.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,21 @@ register listings. You can add additional modules by passing an array to
generate_docs("build/documentation", sphinx_extensions=['sphinx.ext.mathjax'])
```

You may need to pass additional configuration to `conf.py`. In this case, pass it
as `sphinx_extra_config`. For example:

```python
generate_docs("build/documentation",
sphinx_extensions=['sphinx_math_dollar', 'sphinx.ext.mathjax'],
sphinx_extra_config=r"""
mathjax_config = {
'tex2jax': {
'inlineMath': [ ["\\(","\\)"] ],
'displayMath': [["\\[","\\]"] ],
},
}""")
```

By default, `socdoc` unconditionally overwrites all files in the output
directory, including the sphinx `conf.py` file. To disable this feature
so you can customize your own `conf.py` file, pass `from_scratch=False`:
Expand Down

0 comments on commit 29b2baf

Please sign in to comment.