From 37a120c82f8d097148294a908f4e5e7ad03f2f43 Mon Sep 17 00:00:00 2001 From: ninabreznik Date: Thu, 24 May 2018 01:10:48 -0400 Subject: [PATCH] Markdown setup --- docs/conf.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index e3b2bc6562..76a443ee9a 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -14,6 +14,8 @@ import sys import os +import recommonmark +from recommonmark.transform import AutoStructify # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the @@ -43,9 +45,7 @@ source_parsers = { '.md': CommonMarkParser, } -# The suffix(es) of source filenames. -# You can specify multiple suffix as a list of string: -source_suffix = ['.rst', '.md']html +source_suffix = ['.rst', '.md'] # The encoding of source files. #source_encoding = 'utf-8-sig' @@ -293,3 +293,10 @@ texinfo_documents = [ # If true, do not generate a @detailmenu in the "Top" node's menu. #texinfo_no_detailmenu = False + +def setup(app): + app.add_config_value('recommonmark_config', { + 'url_resolver': lambda url: github_doc_root + url, + 'auto_toc_tree_section': 'Contents', + }, True) + app.add_transform(AutoStructify)