From aea41c6ecd05535ac6a507c1098c35e3926bc98f Mon Sep 17 00:00:00 2001 From: endolith Date: Sun, 19 Mar 2023 19:16:51 -0400 Subject: [PATCH] myst works but not with mermaid probably related to https://github.com/executablebooks/MyST-Parser/pull/742 and https://github.com/executablebooks/MyST-Parser/issues/366 and needing ```{mermaid} instead of the usual ```mermaid that renders in GitHub, Typora, etc. --- docs/conf.py | 8 +------- docs/index.rst | 4 ++-- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 36b2399..e8044e9 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -33,7 +33,7 @@ extensions = [ 'sphinx.ext.autodoc', 'numpydoc', - 'm2r2', + 'myst_parser', 'sphinxcontrib.mermaid', ] @@ -63,12 +63,6 @@ '.md': 'markdown', } -# Map the markdown files to the m2r2 parser -source_parsers = { - '.md': 'm2r2.parser.M2RParser', -} - - # Copy ./examples/results images into documentation so they show up when # markdown files with relative paths are transcluded (suggested by ChatGPT-4) import os diff --git a/docs/index.rst b/docs/index.rst index ca72192..e08ea39 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -10,8 +10,8 @@ Welcome to elsim's documentation! :maxdepth: 2 :caption: Contents: -.. mdinclude:: ../README.md - +.. include:: ../README.md + :parser: myst_parser.sphinx_ Indices and tables