Sol3 (sol2 v3.0) - a C++ <-> Lua API wrapper with advanced features and top notch performance - is here, and it's great! Documentation:
Go to file
2013-11-03 11:35:10 +08:00
sphinx_rtd_theme Python package 2013-11-03 11:35:10 +08:00
.gitignore basics 2013-10-17 11:44:56 -07:00
bower.json minor fixes 2013-10-22 21:23:06 -07:00
Gruntfile.js spit out compressed versions of css now 2013-10-24 12:22:53 -07:00
LICENSE Initial commit 2013-10-17 10:10:50 -07:00
MANIFEST.in Python package 2013-11-03 11:35:10 +08:00
package.json set up some grunt stuff to automate builds 2013-10-22 21:35:07 -07:00
README.rst Python package 2013-11-03 11:35:10 +08:00
screen_desktop.png add screens 2013-10-18 07:59:08 -07:00
screen_mobile.png update screenshot 2013-10-30 12:28:47 -07:00
setup.py Python package 2013-11-03 11:35:10 +08:00

.. _readthedocs.org: http://www.readthedocs.org
.. _bower: http://www.bower.io
.. _sphinx: http://www.sphinx-doc.org
.. _compass: http://www.compass-style.org
.. _wyrm: http://www.github.com/snide/wyrm/
.. _grunt: http://www.gruntjs.com
.. _node: http://www.nodejs.com
.. _demo: http://docs.readthedocs.org

**************************
Read the Docs Sphinx Theme
**************************

View a working demo_ over on readthedocs.org_.

This is a prototype mobile-friendly sphinx_ theme I made for readthedocs.org_. It's
currently in development and includes some rtd variable checks that can be ignored
if you're just trying to use it on your project outside of that site.

.. image:: screen_mobile.png
    :width: 100%

Installation
============

Via package
-----------

Download the package or add it to your ``requirements.txt`` file:

.. code-block:: bash

    $ pip install -e git+git://github.com/tony/sphinx_rtd_theme@pypi#egg=sphinx_rtd_theme

In your ``conf.py`` file:

.. code-block:: python

    import sphinx_rtd_theme

    html_theme = "sphinx_rtd_theme"

    html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]

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-block:: python

    html_theme = "sphinx_rtd_theme"
    html_theme_path = ["_themes", ]

How the Table of Contents builds
================================

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 the theme reverts to sphinx's usual local toctree.

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.

Contributing or modifying the theme
===================================

This theme relies pretty heavily on a couple other sass libraries, but most notably wyrm_,
a frontend library I'm currently building. I've tried to keep most of the layout specific
code in this repo, but a lot of the rST text formatting is done over there. Wyrm is pretty
spartan and undocumented at the moment, so if you simply want to create some bug issues
for me rather than setting up a pull request, that's totally OK with me!

To load the dependencies you'll need to install bower_, which itself requires node_ to run.
Then simply run a ``bower install`` in the root directory to install the dependencies.
Once installed, make your sass changes to the ``sphix_rtd_theme/sass`` directory.

I've also set up a basic grunt_ command to update any dependencies and compile the css.

TODO
====
* Separate some sass variables at the theme level so you can overwrite some basic colors.
* Add the ability to set a logo.