Sphinx usage markdown

Markdown

Markdown is a lightweight markup language with a simplistic plain text formatting syntax. It exists in many syntactically different flavors.

To support Markdown-based documentation, Sphinx can use recommonmark.

recommonmark is a Docutils bridge to CommonMark-py, a Python package for parsing the CommonMark Markdown flavor.

Practical sphinx

markdown

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# For conversion from markdown to html
import recommonmark.parser

# Add a source file parser for markdown
source_parsers = {
        '.md': 'recommonmark.parser.CommonMarkParser'
}

# Add type of source files
source_suffix = ['.rst', '.md']