Skip to content

Commit

Permalink
The error is now clearer:
Browse files Browse the repository at this point in the history
This is happening because both m2r2 and recommonmark are trying to handle .md files. Let's fix your conf.py by removing one of them. Since you're using m2r2 for the mdinclude directive, let's keep that and remove recommonmark:
  • Loading branch information
endolith committed Nov 18, 2024
1 parent 826b170 commit 3377594
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
11 changes: 2 additions & 9 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@
'numpydoc',
'm2r2',
'sphinxcontrib.mermaid',
'recommonmark',
]
]

extlinks = {
'doi': ('https://dx.doi.org/%s', 'doi:%s'),
Expand Down Expand Up @@ -68,7 +67,7 @@

source_suffix = {
'.rst': 'restructuredtext',
'.md': 'markdown',
'.md': 'm2r2',
}

# Configure m2r2
Expand All @@ -84,12 +83,6 @@
from recommonmark.transform import AutoStructify

def setup(app):
app.add_config_value('recommonmark_config', {
'enable_eval_rst': True,
'enable_math': True,
'enable_inline_math': True,
}, True)
app.add_transform(AutoStructify)
app.connect('build-finished', copy_examples)

# Copy ./examples/results images into documentation so they show up when
Expand Down
3 changes: 1 addition & 2 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ numpydoc
m2r2
sphinxcontrib.mermaid
sphinx_rtd_theme
sphinxcontrib-apidoc
recommonmark
sphinxcontrib-apidoc

0 comments on commit 3377594

Please sign in to comment.