Skip to content

Commit

Permalink
Merging upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielOaks committed Jan 5, 2014
2 parents 8bd1938 + d45046d commit 48271ad
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 4 deletions.
21 changes: 20 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,27 @@ 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
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
====
* Build real demo docs with lots of rst examples
* Update to font-awesome 4.0 and have it build from bower, not the copy/paste hack I have now.
* Separate some sass variables at the theme level so you can overwrite some basic colors.
1 change: 1 addition & 0 deletions sass/_theme_rst.sass
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@
border: none
td
border: none
padding-top: 5px
.field-name
padding-right: 10px
text-align: left
Expand Down
2 changes: 1 addition & 1 deletion sphinx_rtd_theme/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@
{%- endif %}
</p>

{% trans %}<a href="https://www.github.com/snide/sphinx_rtd_theme">Sphinx theme</a> provided by <a href="http://readthedocs.org">Read the Docs</a>{% endtrans %}
{% trans %}<a href="https://github.com/snide/sphinx_rtd_theme">Sphinx theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>{% endtrans %}
</footer>
2 changes: 1 addition & 1 deletion sphinx_rtd_theme/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
{%- endblock %}
{%- block extrahead %} {% endblock %}

<script src="//cdnjs.cloudflare.com/ajax/libs/modernizr/2.6.2/modernizr.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/modernizr/2.6.2/modernizr.min.js"></script>

</head>

Expand Down
2 changes: 1 addition & 1 deletion sphinx_rtd_theme/static/css/theme.css

Large diffs are not rendered by default.

0 comments on commit 48271ad

Please sign in to comment.