sphinx-markdown
This provides Markdown file support for Sphinx via RST inclusion.
Installation
pip install sphinx-markdown
Using
Add sphinx_markdown
to your Sphinx project's conf.py
by appending it to the
extensions
list.
Configuration
There are a couple of configuration options available.
-
markdown_extensions
provides a list of extensions to be passed to the Markdown parser -
markdown_search
replaces the search functionality to use the included Markdown document instead of just the filename. You will need to sethtml_copy_source
toTrue
in order for search to work.
Example Config
extensions = ['sphinx.ext.autodoc', 'numpydoc', 'sphinx_markdown']
html_copy_source = True
markdown_search = True
markdown_extensions = ['gfm'] # Github Flavored Markdown (pip install py-gfm)
Example RST
.. markdown-ingest::
filename: README.md