aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2022-02-18 16:53:11 -0300
committerSilvio Rhatto <rhatto@riseup.net>2022-02-18 16:53:11 -0300
commit18560184e346994f36930282200709bf274d0fdd (patch)
tree3805f3039b724cb034b2c39730f176667e52e521
parent2042afa0df4b7a8923487d47f36ecf92df9ff0cd (diff)
downloadtemplates-18560184e346994f36930282200709bf274d0fdd.tar.gz
templates-18560184e346994f36930282200709bf274d0fdd.tar.bz2
Fix: updates sphinx config
-rw-r--r--conf.py29
1 files changed, 19 insertions, 10 deletions
diff --git a/conf.py b/conf.py
index 3ae6efc..a0383ec 100644
--- 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)