1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
|
************
Installation
************
Install the package (or add it to your ``requirements.txt`` file):
.. code:: console
$ pip install sphinx_rtd_theme
In your ``conf.py`` file:
.. code:: python
import sphinx_rtd_theme
extensions = [
...
'sphinx_rtd_theme',
]
html_theme = "sphinx_rtd_theme"
.. note::
Adding this theme as an extension is what enables localization of theme
strings in your translated output. If these strings are not translated in
your output, either we lack the localized strings for your locale, or you
are using an old version of the theme.
Via Git or Download
===================
Symlink or subtree the ``sphinx_rtd_theme/sphinx_rtd_theme`` repository into your documentation at
``docs/_themes/sphinx_rtd_theme`` then add the following two settings to your Sphinx
``conf.py`` file:
.. code:: python
html_theme = "sphinx_rtd_theme"
html_theme_path = ["_themes", ]
|