Switch from recommonmark to MyST parser for Sphinx
This commit is contained in:
parent
c8325055a8
commit
01d74994bc
2 changed files with 16 additions and 13 deletions
27
conf.py
27
conf.py
|
@ -16,8 +16,6 @@
|
||||||
# import sys
|
# import sys
|
||||||
# sys.path.insert(0, os.path.abspath('.'))
|
# sys.path.insert(0, os.path.abspath('.'))
|
||||||
|
|
||||||
import recommonmark
|
|
||||||
from recommonmark.transform import AutoStructify
|
|
||||||
|
|
||||||
# -- Project information -----------------------------------------------------
|
# -- Project information -----------------------------------------------------
|
||||||
|
|
||||||
|
@ -41,10 +39,10 @@ release = u''
|
||||||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
||||||
# ones.
|
# ones.
|
||||||
extensions = [
|
extensions = [
|
||||||
'sphinx.ext.autodoc',
|
|
||||||
'sphinx.ext.todo',
|
|
||||||
'recommonmark',
|
|
||||||
'myst_parser',
|
'myst_parser',
|
||||||
|
'sphinx.ext.autodoc',
|
||||||
|
'sphinx.ext.autosectionlabel',
|
||||||
|
'sphinx.ext.todo',
|
||||||
]
|
]
|
||||||
|
|
||||||
# Add any paths that contain templates here, relative to this directory.
|
# Add any paths that contain templates here, relative to this directory.
|
||||||
|
@ -208,11 +206,16 @@ epub_exclude_files = ['search.html']
|
||||||
# If true, `todo` and `todoList` produce output, else they produce nothing.
|
# If true, `todo` and `todoList` produce output, else they produce nothing.
|
||||||
todo_include_todos = True
|
todo_include_todos = True
|
||||||
|
|
||||||
# App set-up hook to enable embedding ReStructuredText in Markdown.
|
|
||||||
|
autodoc_member_order = "bysource"
|
||||||
|
|
||||||
|
nitpick_ignore = [
|
||||||
|
("py:class", "Any"),
|
||||||
|
("py:class", "Tuple"),
|
||||||
|
("py:class", "ForwardRef"),
|
||||||
|
("py:class", "NoneType"),
|
||||||
|
("py:class", "TableRow"),
|
||||||
|
]
|
||||||
|
|
||||||
def setup(app):
|
def setup(app):
|
||||||
app.add_config_value('recommonmark_config', {
|
"""Add functions to the Sphinx setup."""
|
||||||
'enable_auto_toc_tree': True,
|
|
||||||
'auto_toc_tree_section': 'Contents',
|
|
||||||
'enable_eval_rst': True,
|
|
||||||
}, True)
|
|
||||||
app.add_transform(AutoStructify)
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
git+https://github.com/readthedocs/recommonmark.git
|
myst-parser[sphinx]
|
||||||
|
|
Loading…
Reference in a new issue