mirror of
https://github.com/vale981/recommonmark
synced 2025-03-05 10:01:39 -05:00
add autostructify section to main readme
This commit is contained in:
parent
ee2c52035d
commit
1a52eba1c7
1 changed files with 30 additions and 0 deletions
30
README.md
30
README.md
|
@ -34,6 +34,36 @@ source_suffix = ['.rst', '.md']
|
|||
|
||||
This allows you to write both `.md` and `.rst` files inside of the same project.
|
||||
|
||||
### AutoStructify
|
||||
|
||||
To use the advanced markdown to rst transformations you must add `AutoStructify` to your Sphinx conf.py.
|
||||
|
||||
```python
|
||||
# At top on conf.py (with other import statements)
|
||||
import recommonmark
|
||||
from recommonmark.transform import AutoStructify
|
||||
|
||||
# At the bottom of conf.py
|
||||
def setup(app):
|
||||
app.add_config_value('recommonmark_config', {
|
||||
'url_resolver': lambda url: github_doc_root + url,
|
||||
'auto_toc_tree_section': 'Contents',
|
||||
}, True)
|
||||
app.add_transform(AutoStructify)
|
||||
```
|
||||
|
||||
See https://github.com/rtfd/recommonmark/blob/master/docs/conf.py for a full example.
|
||||
|
||||
AutoStructify comes with the following options. See http://recommonmark.readthedocs.org/en/latest/auto_structify.html for more information about the specific features.
|
||||
|
||||
* enable_auto_toc_tree: enable the Auto Toc Tree feature.
|
||||
* auto_toc_tree_section: when True, Auto Toc Tree will only be enabled on section that matches the title.
|
||||
* enable_auto_doc_ref: enable the Auto Doc Ref feature.
|
||||
* enable_math: enable the Math Formula feature.
|
||||
* enable_inline_math: enable the Inline Math feature.
|
||||
* enable_eval_rst: enable the evaluate embedded reStructuredText feature.
|
||||
* url_resolver: a function that maps a existing relative position in the document to a http link
|
||||
|
||||
## Development
|
||||
|
||||
You can run the tests by running `tox` in the top-level of the project.
|
||||
|
|
Loading…
Add table
Reference in a new issue