From a4f34252a5021af968417ebfd68d8e646ad32fb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?benjamin=20melan=C3=A7on?= Date: Sun, 22 Jul 2018 11:55:35 -0400 Subject: [PATCH] Add and configure recommonmark --- conf.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/conf.py b/conf.py index 90262c7..c5bca90 100644 --- a/conf.py +++ b/conf.py @@ -16,6 +16,8 @@ # import sys # sys.path.insert(0, os.path.abspath('.')) +import recommonmark +from recommonmark.transform import AutoStructify # -- Project information ----------------------------------------------------- @@ -198,3 +200,13 @@ epub_exclude_files = ['search.html'] # If true, `todo` and `todoList` produce output, else they produce nothing. todo_include_todos = True + +# App set-up hook to enable embedding ReStructuredText in Markdown. +def setup(app): + app.add_config_value('recommonmark_config', { + 'enable_auto_toc_tree': True, + 'auto_toc_tree_section': 'Contents', + 'enable_eval_rst': True, + 'enable_auto_doc_ref': False, + }, True) + app.add_transform(AutoStructify)