From 3e3590b862de8e84291071e25176d78706c4fc74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20Haitz=20Legarreta=20Gorro=C3=B1o?= Date: Tue, 24 Oct 2023 10:32:43 -0400 Subject: [PATCH] DOC: Add Markdown tutorial files to the documentation Add Markdown tutorial files to the documentation. Add the necessary Sphinx extensions and source suffixes for Sphinx to be able to render the Markdown files. Install the `myst-parser` package as a pre-build step so that it is available for `readthedocs`. Documentation: https://www.sphinx-doc.org/en/master/usage/markdown.html --- .readthedocs.yaml | 1 + doc/conf.py | 3 ++- doc/index.rst | 7 +++++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index e8b53c57..79c76a90 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -15,6 +15,7 @@ build: - liblapack-dev jobs: pre_build: + - pip install --upgrade myst-parser - sphinx-apidoc -f -o doc . # Build documentation in the doc/ directory with Sphinx diff --git a/doc/conf.py b/doc/conf.py index 26b62c84..031fdaee 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -66,6 +66,7 @@ # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ + "myst_parser", "sphinx.ext.autodoc", "sphinx.ext.napoleon", ] @@ -79,7 +80,7 @@ exclude_patterns = ["*tests*"] # Sources -source_suffix = ".rst" +source_suffix = [".rst", ".md"] # The master toctree document. master_doc = "index" diff --git a/doc/index.rst b/doc/index.rst index aa5da2cf..5155a9ba 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -17,6 +17,13 @@ tools. bin utilities +.. toctree:: + :maxdepth: 1 + :caption: Tutorials + + bundles + subject-specific-tractography-parcellation + Indices and tables ==================