2018-01-29 20:44:03 -05:00
|
|
|
************
|
|
|
|
|
Installation
|
|
|
|
|
************
|
|
|
|
|
|
|
|
|
|
Install the package (or add it to your ``requirements.txt`` file):
|
|
|
|
|
|
2019-07-19 11:35:12 -06:00
|
|
|
.. code:: console
|
2018-01-29 20:44:03 -05:00
|
|
|
|
2019-10-23 11:08:08 -04:00
|
|
|
$ pip install sphinx_rtd_theme
|
2018-01-29 20:44:03 -05:00
|
|
|
|
|
|
|
|
In your ``conf.py`` file:
|
|
|
|
|
|
|
|
|
|
.. code:: python
|
|
|
|
|
|
2019-07-16 20:27:16 -06:00
|
|
|
import sphinx_rtd_theme
|
2018-01-29 20:44:03 -05:00
|
|
|
|
2019-07-16 20:27:16 -06:00
|
|
|
extensions = [
|
|
|
|
|
...
|
|
|
|
|
'sphinx_rtd_theme',
|
|
|
|
|
]
|
2018-01-29 20:44:03 -05:00
|
|
|
|
2019-07-16 20:27:16 -06:00
|
|
|
html_theme = "sphinx_rtd_theme"
|
2018-01-29 20:44:03 -05:00
|
|
|
|
|
|
|
|
|
2019-07-16 20:27:16 -06:00
|
|
|
.. note::
|
2021-03-15 10:12:50 -05:00
|
|
|
|
|
|
|
|
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.
|
2019-07-19 15:29:24 -06:00
|
|
|
|
|
|
|
|
Via Git or Download
|
|
|
|
|
===================
|
|
|
|
|
|
2021-03-15 10:12:50 -05:00
|
|
|
.. warning::
|
|
|
|
|
|
|
|
|
|
Installing directly from the repo is deprecated.
|
|
|
|
|
Static assets won't be included in the repo in a future release.
|
|
|
|
|
|
2019-07-19 15:29:24 -06:00
|
|
|
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", ]
|
2021-03-15 18:05:20 -04:00
|
|
|
|
|
|
|
|
Compatibility
|
|
|
|
|
=============
|
|
|
|
|
|
2021-03-17 18:29:02 -04:00
|
|
|
Python
|
|
|
|
|
------
|
|
|
|
|
|
|
|
|
|
``sphinx_rtd_theme`` requires Python 2.7 or Python 3.4 or greater.
|
|
|
|
|
|
|
|
|
|
Sphinx
|
|
|
|
|
------
|
|
|
|
|
|
2021-03-15 18:05:20 -04:00
|
|
|
``sphinx_rtd_theme`` depends on at least Sphinx 1.6 although,
|
|
|
|
|
we recommend at least Sphinx 2 to take advantage of the html5 writer.
|
|
|
|
|
The html4 writer is still supported however,
|
|
|
|
|
it is deprecated and support will be removed in the near future.
|