|
15 | 15 | import sys |
16 | 16 | import os |
17 | 17 | import shlex |
| 18 | +from recommonmark.parser import CommonMarkParser |
| 19 | +from recommonmark.transform import AutoStructify |
18 | 20 |
|
19 | 21 | # If extensions (or modules to document with autodoc) are in another directory, |
20 | 22 | # add these directories to sys.path here. If the directory is relative to the |
|
33 | 35 | 'sphinx.ext.autodoc', |
34 | 36 | 'sphinx.ext.mathjax', |
35 | 37 | 'sphinx.ext.viewcode', |
| 38 | + 'sphinx.ext.todo', |
| 39 | + 'sphinx_markdown_tables', |
36 | 40 | ] |
37 | 41 |
|
38 | 42 | # Add any paths that contain templates here, relative to this directory. |
39 | 43 | templates_path = ['_templates'] |
40 | 44 |
|
41 | 45 | # The suffix(es) of source filenames. |
42 | 46 | # You can specify multiple suffix as a list of string: |
43 | | -# source_suffix = ['.rst', '.md'] |
44 | | -source_suffix = '.rst' |
| 47 | +source_parsers = { |
| 48 | + '.md': CommonMarkParser, |
| 49 | +} |
| 50 | + |
| 51 | +source_suffix = ['.rst', '.md'] |
45 | 52 |
|
46 | 53 | # The encoding of source files. |
47 | 54 | #source_encoding = 'utf-8-sig' |
|
112 | 119 |
|
113 | 120 | # The theme to use for HTML and HTML Help pages. See the documentation for |
114 | 121 | # a list of builtin themes. |
115 | | -html_theme = 'classic' |
| 122 | +html_theme = 'sphinx_rtd_theme' |
116 | 123 |
|
117 | 124 | # Theme options are theme-specific and customize the look and feel of a theme |
118 | 125 | # further. For a list of options available for each theme, see the |
|
286 | 293 |
|
287 | 294 | # If true, do not generate a @detailmenu in the "Top" node's menu. |
288 | 295 | #texinfo_no_detailmenu = False |
| 296 | + |
| 297 | +def setup(app): |
| 298 | + app.add_config_value('recommonmark_config', { |
| 299 | + 'auto_toc_tree_section': 'Contents', |
| 300 | + 'enable_inline_math': True, |
| 301 | + 'enable_eval_rst': True, |
| 302 | + 'enable_math': True |
| 303 | + }, True) |
| 304 | + app.add_transform(AutoStructify) |
0 commit comments