]> gitweb.fluxo.info Git - templates.git/commitdiff
Fix: updates sphinx config
authorSilvio Rhatto <rhatto@riseup.net>
Fri, 18 Feb 2022 19:53:11 +0000 (16:53 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Fri, 18 Feb 2022 19:53:11 +0000 (16:53 -0300)
conf.py

diff --git a/conf.py b/conf.py
index 3ae6efc20e2599641c6db2607ebec8bebcae3751..a0383ecac5b065cde61be1fde2d0e8db012892fe 100644 (file)
--- a/conf.py
+++ b/conf.py
@@ -26,20 +26,24 @@ from recommonmark.transform import AutoStructify
 
 # Add any Sphinx extension module names here, as strings. They can be extensions
 # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
-extensions = []
+extensions = [
+    'sphinx.ext.autodoc',
+    'recommonmark',
+]
 
 # Add any paths that contain templates here, relative to this directory.
 templates_path = ['_templates']
 
-# Parsers
-# See http://www.sphinx-doc.org/en/stable/markdown.html
-source_parsers = {
-  '.md': 'recommonmark.parser.CommonMarkParser',
-}
-
-# The suffix of source filenames.
+# 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': 'restructuredtext',
+    '.txt': 'markdown',
+    '.md' : 'markdown',
+}
 
 # The encoding of source files.
 #source_encoding = 'utf-8-sig'
@@ -294,6 +298,11 @@ epub_basename  = 'templates'
 # Allow duplicate toc entries.
 #epub_tocdup = True
 
+# -- Extension configuration -------------------------------------------------
+import sys, os
+import recommonmark
+from recommonmark.transform import AutoStructify
+
 # See http://recommonmark.readthedocs.io
 #github_doc_root = 'https://github.com/rtfd/recommonmark/tree/master/doc/'
 def setup(app):
@@ -301,7 +310,7 @@ def setup(app):
             #'url_resolver': lambda url: github_doc_root + url,
             'auto_toc_tree_section': 'Index',
             'enable_auto_toc_tree' : True,
-            'enable_auto_doc_ref'  : True,
+            #'enable_auto_doc_ref' : True,
             'enable_eval_rst'      : True,
             }, True)
     app.add_transform(AutoStructify)