Installation¶
Get it from PyPI:
> pip install sphinx-better-theme
Or download the zip file and run the usual command:
> python setup.py install
Once the package is installed, make these changes to conf.py
to direct
Sphinx to use the theme:
from better import better_theme_path
html_theme_path = [better_theme_path]
html_theme = 'better'
Read the Docs Configuration¶
Using sphinx-better-theme with Read the Docs is easy. You just need to tell it to install the package.
First, create a requirements.txt
file just for your docs. It should
look like this:
sphinx-better-theme==0.1.4
# other dependencies for your docs if any
I suggest putting it in your docs folder, e.g. at
docs/requirements.txt
.
Then, go to your Read the Docs admin panel. Make sure the Use
virtualenv checkbox is enabled, and set the Requirements file
field to the path to your requirements.txt
file.
Read the Docs should now build and display your theme correctly, assuming your
conf.py
contains the changes described above.