From 460652b87f784ef93e0c8d1521cfcb0f497483df Mon Sep 17 00:00:00 2001 From: endolith Date: Mon, 18 Nov 2024 12:41:46 -0500 Subject: [PATCH] Try to switch to myst now that it supports mermaid https://stackoverflow.com/a/76819611/125507 --- docs/conf.py | 11 +++++++---- docs/requirements.txt | 7 ++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 9fc194b..8fbd56c 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -32,11 +32,11 @@ # ones. extensions = [ 'sphinx.ext.autodoc', - 'sphinx.ext.extlinks', - 'numpydoc', - 'm2r2', + 'sphinx.ext.napoleon', + 'sphinx.ext.viewcode', 'sphinxcontrib.mermaid', - ] + 'myst_parser' +] extlinks = { 'doi': ('https://dx.doi.org/%s', 'doi:%s'), @@ -88,3 +88,6 @@ def copy_examples(app, docname): def setup(app): app.connect('build-finished', copy_examples) + +# Add this to enable regular markdown mermaid syntax +myst_fence_as_directive = ["mermaid"] diff --git a/docs/requirements.txt b/docs/requirements.txt index 5d8394e..f272c49 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,9 +1,6 @@ -sphinx<7.0 -docutils==0.16 -mistune==0.8.4 -m2r2 +myst-parser +sphinxcontrib.mermaid -e . numpydoc -sphinxcontrib.mermaid sphinx_rtd_theme sphinxcontrib-apidoc \ No newline at end of file