From 39a6d5615be78454090b8332adea164698cbcfae Mon Sep 17 00:00:00 2001 From: Anthony O'Dowd Date: Wed, 24 Jan 2018 16:35:48 +0000 Subject: [PATCH] FAB-7892 Add markdown capability to documentation add license headers to changed files Change-Id: I1e7bdf4b655c35392e80ef88ca93a7dd4b0befe0 Signed-off-by: Anthony O'Dowd Signed-off-by: Christopher Ferris --- docs/requirements.txt | 2 ++ docs/source/conf.py | 13 ++++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index 9d3e4e1d8e6..e1e0a8fc7eb 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 python-markdown-math==0.2 alabaster==0.7.8 @@ -12,3 +13,4 @@ six==1.10.0 snowballstemmer==1.2.1 Sphinx==1.4.4 sphinx-rtd-theme==0.1.9 +recommonmark==0.4.0 diff --git a/docs/source/conf.py b/docs/source/conf.py index a9ac538b3cc..4a367de066f 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -1,5 +1,7 @@ # -*- coding: utf-8 -*- # +# SPDX-License-Identifier: Apache-2.0 +# # hyperledger-fabricdocs documentation build configuration file, created by # sphinx-quickstart on Mon Feb 20 16:11:53 2017. # @@ -43,11 +45,20 @@ # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] +# recommonmark is a python utility that allows markdown to be used within +# Sphinx projects. +# Installed version as per directive in docs/requirement.txt +from recommonmark.parser import CommonMarkParser + +source_parsers = { + '.md': CommonMarkParser, +} + # 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'] # The master toctree document. master_doc = 'index'