diff options
author | Milas Bowman <milas.bowman@docker.com> | 2022-07-28 16:38:57 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-28 16:38:57 -0400 |
commit | ab43018b027e48c53f3cf6d71ce988358e3c204e (patch) | |
tree | e5c41c64f0400df3b25e743ad2beb69ce03eb658 | |
parent | 9bdb5ba2bab682a02bc3348e359822218dad7e96 (diff) | |
download | docker-py-ab43018b027e48c53f3cf6d71ce988358e3c204e.tar.gz |
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 <milas.bowman@docker.com>
-rw-r--r-- | docs-requirements.txt | 2 | ||||
-rw-r--r-- | docs/conf.py | 17 |
2 files changed, 7 insertions, 12 deletions
diff --git a/docs-requirements.txt b/docs-requirements.txt index 1f342fa..04d1aff 100644 --- a/docs-requirements.txt +++ b/docs-requirements.txt @@ -1,2 +1,2 @@ -recommonmark==0.7.1 +myst-parser==0.18.0 Sphinx==5.1.1 diff --git a/docs/conf.py b/docs/conf.py index 2b0a719..1258a42 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -33,24 +33,19 @@ sys.path.insert(0, os.path.abspath('..')) extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.napoleon', + 'myst_parser' ] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] -from recommonmark.parser import CommonMarkParser - -source_parsers = { - '.md': CommonMarkParser, +source_suffix = { + '.rst': 'restructuredtext', + '.txt': 'markdown', + '.md': 'markdown', } -# The suffix(es) of source filenames. -# You can specify multiple suffix as a list of string: -# -source_suffix = ['.rst', '.md'] -# source_suffix = '.md' - # The encoding of source files. # # source_encoding = 'utf-8-sig' @@ -80,7 +75,7 @@ version = f'{version_info[0]}.{version_info[1]}' # # This is also used if you do content translation via gettext catalogs. # Usually you set "language" from the command line for these cases. -language = None +language = 'en' # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: |