Skip to content

Commit ab43018

Browse files
authored
docs: fix markdown rendering (#3020)
Follow instructions at https://www.sphinx-doc.org/en/master/usage/markdown.html. This switches from `recommonmark` (deprecated) to `myst-parser` (recommended). Only impacts the changelog page, which was broken after recent upgrades to Sphinx for Python 3.10 compatibility. Signed-off-by: Milas Bowman <[email protected]>
1 parent 9bdb5ba commit ab43018

File tree

2 files changed

+7
-12
lines changed

2 files changed

+7
-12
lines changed

docs-requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
recommonmark==0.7.1
1+
myst-parser==0.18.0
22
Sphinx==5.1.1

docs/conf.py

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,24 +33,19 @@
3333
extensions = [
3434
'sphinx.ext.autodoc',
3535
'sphinx.ext.napoleon',
36+
'myst_parser'
3637
]
3738

3839
# Add any paths that contain templates here, relative to this directory.
3940
templates_path = ['_templates']
4041

4142

42-
from recommonmark.parser import CommonMarkParser
43-
44-
source_parsers = {
45-
'.md': CommonMarkParser,
43+
source_suffix = {
44+
'.rst': 'restructuredtext',
45+
'.txt': 'markdown',
46+
'.md': 'markdown',
4647
}
4748

48-
# The suffix(es) of source filenames.
49-
# You can specify multiple suffix as a list of string:
50-
#
51-
source_suffix = ['.rst', '.md']
52-
# source_suffix = '.md'
53-
5449
# The encoding of source files.
5550
#
5651
# source_encoding = 'utf-8-sig'
@@ -80,7 +75,7 @@
8075
#
8176
# This is also used if you do content translation via gettext catalogs.
8277
# Usually you set "language" from the command line for these cases.
83-
language = None
78+
language = 'en'
8479

8580
# There are two options for replacing |today|: either, you set today to some
8681
# non-false value, then it is used:

0 commit comments

Comments
 (0)