2013-10-31 19:21:58 +00:00
|
|
|
Read the Docs Theme
|
|
|
|
===================
|
|
|
|
|
2014-10-14 19:16:03 +00:00
|
|
|
.. note:: This feature only applies to Sphinx documentation. We are working to bring it to our other documentation backends.
|
|
|
|
|
2013-10-31 20:23:09 +00:00
|
|
|
.. image:: /img/screen_mobile.png
|
|
|
|
|
2013-10-31 20:14:41 +00:00
|
|
|
By default, Read the Docs will use its own custom sphinx theme unless you set one yourself
|
|
|
|
in your ``conf.py`` file. Likewise, setting the theme to ``default`` will accomplish the
|
|
|
|
same behavior. The theme can be found on `github here`_ and is meant to work
|
|
|
|
independently of Read the Docs itself if you want to just use the theme locally.
|
2013-10-31 19:21:58 +00:00
|
|
|
|
2013-10-31 20:14:41 +00:00
|
|
|
This `blog post`_ provides some info about the design, but
|
|
|
|
in short, the theme aims to solve the limitations of Sphinx's default navigation setup,
|
|
|
|
where only a small portion of your docs were accessible in the sidebar. Our theme is also
|
|
|
|
meant to work well on mobile and tablet devices.
|
2013-10-31 19:21:58 +00:00
|
|
|
|
2013-11-12 00:38:14 +00:00
|
|
|
Contributing to the theme
|
|
|
|
-------------------------
|
2013-10-31 20:14:41 +00:00
|
|
|
If you have issues or feedback, please `open an issue`_ on the theme's GitHub repository
|
2013-11-12 00:38:14 +00:00
|
|
|
which itself is a submodule within the larger RTD codebase. That means any changes to the
|
|
|
|
theme or the Read the Docs badge styling should be made there. The code is separate so that
|
|
|
|
it can be used independent of Read the Docs as a regular Sphinx theme.
|
2013-10-31 19:21:58 +00:00
|
|
|
|
2013-10-31 20:14:41 +00:00
|
|
|
How the Table of Contents builds
|
|
|
|
--------------------------------
|
2013-10-31 19:21:58 +00:00
|
|
|
|
2013-10-31 20:14:41 +00:00
|
|
|
Currently the left menu will build based upon any ``toctree(s)`` defined in your ``index.rst`` file.
|
|
|
|
It outputs 2 levels of depth, which should give your visitors a high level of access to your
|
|
|
|
docs. If no toctrees are set in your index.rst file the theme reverts to sphinx's usual
|
|
|
|
local toctree which is based upon the heading set on your current page.
|
2013-10-31 19:21:58 +00:00
|
|
|
|
2013-10-31 20:14:41 +00:00
|
|
|
It's important to note that if you don't follow the same styling for your rST headers across
|
|
|
|
your documents, the toctree will misbuild, and the resulting menu might not show the correct
|
|
|
|
depth when it renders.
|
2013-10-31 19:21:58 +00:00
|
|
|
|
2013-10-31 20:23:09 +00:00
|
|
|
Other style notes
|
|
|
|
-----------------
|
|
|
|
|
2013-11-11 21:11:35 +00:00
|
|
|
* As a responsive style, you should not set a height and width to your images.
|
2013-10-31 20:23:09 +00:00
|
|
|
* Wide tables will add a horizontal scroll bar to maintain the responsive layout.
|
|
|
|
|
2013-10-31 20:14:41 +00:00
|
|
|
.. _github here: https://www.github.com/snide/sphinx_rtd_theme
|
2013-11-03 21:43:04 +00:00
|
|
|
.. _blog post: http://ericholscher.com/blog/2013/nov/4/new-theme-read-the-docs/
|
2013-10-31 19:21:58 +00:00
|
|
|
.. _open an issue: https://github.com/snide/sphinx_rtd_theme/issues
|