From: Sean Cross Date: Fri, 24 Jul 2020 08:03:24 +0000 (+0800) Subject: doc: socdoc: document new `sphinx_extra_config` parameter X-Git-Tag: 24jan2021_ls180~58^2 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=29b2baf927fadc8d79b810157b0a5e2d6e0e4e2c;p=litex.git doc: socdoc: document new `sphinx_extra_config` parameter This allows for appending additional configuration to `conf.py`. Signed-off-by: Sean Cross --- diff --git a/doc/socdoc.md b/doc/socdoc.md index c565c54b..5747c63b 100644 --- a/doc/socdoc.md +++ b/doc/socdoc.md @@ -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`: