chiark / gitweb /
docs: sphnix build: Add markdown support
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 8 Apr 2021 17:41:50 +0000 (18:41 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 8 Apr 2021 19:34:21 +0000 (20:34 +0100)
This is a bit crazy.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
docs/conf.py

index 3a48487553070e9b3635e45996211310b9938218..3a6627fbd91ba7c2754d9f5ea96e9922733ce873 100644 (file)
@@ -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'