mirror of
https://github.com/readthedocs/sphinx_rtd_theme.git
synced 2025-02-25 18:55:21 -06:00
Readme: remove outdated text about building on rtd
This commit is contained in:
parent
e7e082ace8
commit
dc9d3d732e
19
README.rst
19
README.rst
@ -280,25 +280,6 @@ When you're done with your edits, you can run ``grunt build`` to clean out the o
|
|||||||
files and rebuild a new distribution, compressing the css and cleaning out
|
files and rebuild a new distribution, compressing the css and cleaning out
|
||||||
extraneous files. Please do this before you send in a PR.
|
extraneous files. Please do this before you send in a PR.
|
||||||
|
|
||||||
Using this theme locally, then building on Read the Docs?
|
|
||||||
==========================================================
|
|
||||||
|
|
||||||
Currently if you import sphinx_rtd_theme in your local sphinx build, then pass
|
|
||||||
that same config to Read the Docs, it will fail, since RTD gets confused. If
|
|
||||||
you want to run this theme locally and then also have it build on RTD, then
|
|
||||||
you can add something like this to your config. Thanks to Daniel Oaks for this.
|
|
||||||
|
|
||||||
.. code:: python
|
|
||||||
|
|
||||||
# on_rtd is whether we are on readthedocs.org, this line of code grabbed from docs.readthedocs.org
|
|
||||||
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
|
|
||||||
|
|
||||||
if not on_rtd: # only import and set the theme if we're building docs locally
|
|
||||||
import sphinx_rtd_theme
|
|
||||||
html_theme = 'sphinx_rtd_theme'
|
|
||||||
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
|
|
||||||
|
|
||||||
# otherwise, readthedocs.org uses their theme by default, so no need to specify it
|
|
||||||
|
|
||||||
TODO
|
TODO
|
||||||
====
|
====
|
||||||
|
Loading…
Reference in New Issue
Block a user