mirror of
https://github.com/readthedocs/sphinx_rtd_theme.git
synced 2025-02-25 18:55:21 -06:00
parent
cf898d3acc
commit
3f07c6d310
@ -10,15 +10,10 @@ Install the ``sphinx_rtd_theme`` package (or add it to your ``requirements.txt``
|
||||
|
||||
$ pip install sphinx_rtd_theme
|
||||
|
||||
In your Sphinx project's ``conf.py`` file, add ``sphinx_rtd_theme`` to the list of enabled extensions and as the active theme:
|
||||
In your Sphinx project's ``conf.py`` file, define ``html_theme`` to activate the theme:
|
||||
|
||||
.. code:: python
|
||||
|
||||
extensions = [
|
||||
...
|
||||
'sphinx_rtd_theme',
|
||||
]
|
||||
|
||||
html_theme = "sphinx_rtd_theme"
|
||||
|
||||
.. seealso::
|
||||
@ -29,19 +24,6 @@ In your Sphinx project's ``conf.py`` file, add ``sphinx_rtd_theme`` to the list
|
||||
Officially Supported versions of Python, Sphinx, and other dependencies.
|
||||
|
||||
|
||||
.. 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.
|
||||
|
||||
..
|
||||
comment about this note: it's possibly not necessary to add the theme as an extension.
|
||||
Rather, this is an issue caused by setting html_theme_path.
|
||||
See: https://github.com/readthedocs/readthedocs.org/pull/9654
|
||||
|
||||
|
||||
.. _howto_upgrade:
|
||||
|
||||
How to upgrade
|
||||
@ -55,6 +37,5 @@ Otherwise, pip will ignore pre-releases. Add for instance ``sphinx-rtd-theme==1.
|
||||
.. tip::
|
||||
We recommend that you pin the version of Sphinx that your project is built with.
|
||||
We won't release sphinx-rtd-theme without marking its compatibility with Sphinx. So if you do not pin ``sphinx-rtd-theme`` itself, you will always get the *latest compatible* release.
|
||||
|
||||
More information is available in Read the Docs' documentation on :doc:`rtd:guides/reproducible-builds`.
|
||||
|
||||
More information is available in Read the Docs' documentation on :doc:`rtd:guides/reproducible-builds`.
|
||||
|
Loading…
Reference in New Issue
Block a user