[PYTHON] Building Sphinx that can be written in Markdown

background

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.

procedure

It is assumed that the python environment can use virtualenvwrapper.

Environmental preparation

$ mkvirtualenv sphinx
$ pip install sphinx recommonmark

Project generation

$ sphinx-quickstart 

Setting

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

Building Sphinx that can be written in Markdown
Functions that can be used in for statements
Basic algorithms that can be used in competition pros
ANTs image registration that can be used in 5 minutes
Goroutine (parallel control) that can be used in the field
Text analysis that can be done in 5 minutes [Word Cloud]
Goroutine that can be used in the field (errgroup.Group edition)
Scripts that can be used when using bottle in Python
Evaluation index that can be specified in GridSearchCV of sklearn
Confirmation that rkhunter can be installed
Make a Spinbox that can be displayed in Binary with Tkinter
A timer (ticker) that can be used in the field (can be used anywhere)
About character string handling that can be placed in JSON communication
Python standard input summary that can be used in competition pro
Make a Spinbox that can be displayed in HEX with Tkinter
Easy padding of data that can be used in natural language processing
AtCoder C problem summary that can be solved in high school mathematics
Serverless LINE Bot that can be done in 2 hours (source identifier acquisition)
Maximum number of function parameters that can be defined in each language
A story that heroku that can be done in 5 minutes actually took 3 days
I want to create a priority queue that can be updated in Python (2.7)
A personal memo of Pandas related operations that can be used in practice
Easy program installer and automatic program updater that can be used in any language
I made a familiar function that can be used in statistics with Python
It can be achieved in 1 minute! Decorator that caches function execution results in memcached
File types that can be used with Go
List packages that can be updated with pip
Summary of statistical data analysis methods using Python that can be used in business
Geographic information visualization of R and Python that can be expressed in Power BI
Set up an FTP server that can be created and destroyed immediately (in Python)
Morphological analysis and tfidf (with test code) that can be done in about 1 minute
The story that sendmail that can be executed in the terminal did not work with cron
A mechanism to call a Ruby method from Python that can be done in 200 lines
Japanese can be used with Python in Docker environment
Features that can be extracted from time series data
Color list that can be set with tkinter (memorial)
Python knowledge notes that can be used with AtCoder
Can be used in competition pros! Python standard library
[Django] About users that can be used on template
Non-linear simultaneous equations can be easily solved in Python.
Deep learning course that can be crushed on site
Limits that can be analyzed at once with MeCab
List the classes that can be referenced by ObjCClass
How to set up a simple SMTP server that can be tested locally in Python
[Django] Field names, user registration, and login methods that can be used in the User model
[Python3] Code that can be used when you want to resize images in folder units