Skip to content

Commit

Permalink
Use MyST for markdown docs build
Browse files Browse the repository at this point in the history
Moves away from recommonmark to MyST when building the markdown docs.
Recommonmark is deprecated and no longer maintained in favour of MyST.
The only change here is to swap up the dependencies and enable the MyST
plugin in the conf.py.

Signed-off-by: Jordan Borean <jborean93@gmail.com>
  • Loading branch information
jborean93 committed Jan 29, 2024
1 parent b674a57 commit e509231
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 16 deletions.
2 changes: 1 addition & 1 deletion docs-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
myst-parser # For parsing markdown docs instead of rst
Sphinx >= 1.3.1
sphinx-autoapi
sphinx-rtd-theme >= 0.2.5b1
recommonmark >= 0.4.0
8 changes: 0 additions & 8 deletions docs/custom_extensions/custom_recommonmark.py

This file was deleted.

10 changes: 3 additions & 7 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@

sys.path.insert(0, os.path.abspath('../custom_extensions'))

from custom_recommonmark import AllCodeCommonMarkParser

# -- General configuration -----------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
Expand All @@ -30,6 +28,7 @@
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = [
'myst_parser',
'sphinx.ext.autodoc',
'sphinx.ext.intersphinx',
'sphinx.ext.viewcode',
Expand All @@ -47,14 +46,11 @@
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

# Parsers for different suffixes
source_parsers = {
'.md': AllCodeCommonMarkParser
}

# The suffix of source filenames.
source_suffix = ['.rst', '.md']

myst_all_links_external = True

# The encoding of source files.
#source_encoding = 'utf-8-sig'

Expand Down

0 comments on commit e509231

Please sign in to comment.