Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
docs/generated/
docs/modules/
docs/auto_examples/
# sphinx-gallery writes per-example timings on every docs build.
docs/sg_execution_times.rst
historical/

#
Expand Down
14 changes: 4 additions & 10 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
from distutils.version import LooseVersion

import sphinx
from m2r2 import MdInclude

sys.path.insert(0, os.path.abspath("sphinxext"))
sys.path.insert(0, os.path.abspath(os.path.pardir))
Expand Down Expand Up @@ -55,6 +54,10 @@
"sphinxarg.ext", # argparse
"sphinxcontrib.bibtex", # for foot-citations
"recommonmark", # markdown parser
# The `mdinclude` directive, for pulling .md files into .rst pages. Deliberately the
# submodule and not "m2r2": the full extension also registers a parser for .md source
# files, which collides with recommonmark above.
"m2r2.mdinclude",
]

if LooseVersion(sphinx.__version__) < LooseVersion("1.4"):
Expand Down Expand Up @@ -207,15 +210,6 @@ def setup(app):
app.add_css_file("theme_overrides.css")
app.add_css_file("nimare.css")
app.connect("autodoc-process-docstring", generate_example_rst)
# Fix to https://github.com/sphinx-doc/sphinx/issues/7420
# from https://github.com/life4/deal/commit/7f33cbc595ed31519cefdfaaf6f415dada5acd94
# from m2r to make `mdinclude` work
app.add_config_value("no_underscore_emphasis", False, "env")
app.add_config_value("m2r_parse_relative_links", False, "env")
app.add_config_value("m2r_anonymous_references", False, "env")
app.add_config_value("m2r_disable_inline_math", False, "env")
app.add_config_value("m2r_use_mermaid", True, "env")
app.add_directive("mdinclude", MdInclude)


def generate_example_rst(app, what, name, obj, options, lines):
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ include =

[options.extras_require]
doc =
m2r2
m2r2>=1.1
matplotlib
mistune
numpydoc
Expand Down
Loading