From: Ian Jackson Date: Thu, 8 Apr 2021 17:41:50 +0000 (+0100) Subject: docs: sphnix build: Add markdown support X-Git-Tag: otter-0.5.0~125 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=60467d626ff7f374d6ff1a39d2521120385f10df;p=otter.git docs: sphnix build: Add markdown support This is a bit crazy. Signed-off-by: Ian Jackson --- diff --git a/docs/conf.py b/docs/conf.py index 3a484875..3a6627fb 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -39,6 +39,7 @@ release = '' # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ + 'recommonmark', ] # Add any paths that contain templates here, relative to this directory. @@ -47,8 +48,18 @@ templates_path = ['_templates'] # The suffix(es) of source filenames. # You can specify multiple suffix as a list of string: # -# source_suffix = ['.rst', '.md'] -source_suffix = '.rst' +#source_suffix = ['.rst', '.md'] +#source_suffix = '.rst' + +from recommonmark.parser import CommonMarkParser +source_parsers = { + '.md': CommonMarkParser, +} +source_suffix = { + '.rst': 'restructuredtext', + '.txt': 'markdown', + '.md': 'markdown', +} # The master toctree document. master_doc = 'index'