[PYTHON] When you want to keep the Sphinx documentation theme as usual

Introduction

The default theme of Sphinx is very stylish and something different.

After all, I want to use the usual one.

The usual thing

https://github.com/readthedocs/sphinx_rtd_theme

スクリーンショット 2019-11-14 13.12.54.png

This is a very frequently used item.

Apparently, this is a third-party theme, not an official theme, so you'll need to install it separately.

procedure

With Python pip applied to the directory where you want to use the theme

$ pip install sphinx-rtd-theme

To do.

After that, in the configuration file conf.py

conf.py


extensions = [
    'sphinx.ext.autodoc',
    'sphinx.ext.viewcode',
    'sphinx.ext.todo',
    'sphinx.ext.napoleon',
    'sphinx_rtd_theme'
]
html_theme = 'sphinx_rtd_theme'

Just add extensions and html_theme.

Theme site

sphinx-themes has a list of available themes, so It looks good to use it.

Recommended Posts

When you want to keep the Sphinx documentation theme as usual
When you want to update the chrome driver.
When you want to save the result of the callback function somewhere
When you want to adjust the axis scale interval with APLpy
When you want to use it as it is when using it with lambda memo
Python Note: When you want to know the attributes of an object
When you want to change the HTTP headers of Flask's test client
Linux: Netplan configuration guide to see when you want to fix the IP address
Settings when you want to run python-mecab with travis
When you want to filter with Django REST framework
When you want to play a game via Proxy
When the variable you want to superscript with matplotlib is two or more characters
When you want to plt.save in a for statement
The programming language you want to be able to use
When you want to quickly translate a C # sample into another language such as VB
[Python] When you want to import and use your own package in the upper directory
Solution when you want to use cv_bridge with python3 (virtualenv)
[Django] A memorandum when you want to communicate asynchronously [Python3]
[AWS] What to do when you want to pip with Lambda
I wanted to skip certain extensions when building Sphinx documentation
Use aggdraw when you want to draw beautifully with pillow
When you want to register Django's initial data with relationships
When you want to use python2.x on modern Gentoo Linux
If you want your colleagues to use the same language
When you want to hit a UNIX command on Python
(Memo) Until you extract only the part you want from a certain Web page, convert it to a Sphinx page, and print it as a PDF
When you want to use multiple versions of the same Python library (virtual environment using venv)
[Subprocess] When you want to execute another Python program in Python code
I want to record the execution time and keep a log.
[Linux] I want to know the date when the user logged in
When you want to print to standard output with print while testing with pytest
I want to run the Python GUI when starting Raspberry Pi
[Python] When you want to use all variables in another file
When you want to send an object with requests using flask
What to do when you get "I can't see the site !!!!"
When you want to sort a multidimensional list by multiple lines
Memorandum Regular expression When there are multiple characters in the character string that you want to separate
Wercker step to compile Sphinx documentation
Try to introduce the theme to Pelican
Key operations you want to know
If you want a singleton in python, think of the module as a singleton
Gist repository to use when you want to try a little with ansible
When you want to replace a column with a missing value (NaN) column by column
When introducing the Google Cloud Vision API to rails, I followed the documentation.
Wrapper when you want to output utf-8 + ansi color on Windows console
Isn't Qt the strongest library if you want to easily output SVG?
Memorandum of means when you want to make machine learning with 50 images
[Python3] Code that can be used when you want to change the extension of an image at once
Install the python library when you're not a sudoer (or if you don't want new users to be Sudoer, but you don't mind having the Python Library installed as you like)