Sphinx is an open source document system used in various places including various Python libraries. In Sphinx, documents are written in a lightweight markup language called reStructuredText, but nowadays it is becoming more popular with services such as GitHub and Qiita, and I'm used to Markdown [^ usability].
Therefore, I would like to build an environment where I can write in Markdown even with Sphinx. Use the Sphinx extension called recommonmark.
It is assumed that the python environment can use virtualenvwrapper.
$ mkvirtualenv sphinx
$ pip install sphinx recommonmark
$ sphinx-quickstart
Add the following description to conf.py.
from recommonmark.parser import CommonMarkParser
source_parsers = {
'.md': CommonMarkParser,
}
source_suffix = ['.rst', '.md']
After that, if you write a document with the extension .md
, it will be automatically compiled as Markdown.
[^ Usability]: It's just a personal impression. .. ..
Recommended Posts