Skip to content

Commit

Permalink
Use "RTD" theme when building documentation
Browse files Browse the repository at this point in the history
Signed-off-by: Jim Easterbrook <jim@jim-easterbrook.me.uk>
  • Loading branch information
jim-easterbrook committed May 20, 2015
1 parent 5727455 commit 6376d6f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
8 changes: 6 additions & 2 deletions src/doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
#sys.path.insert(0, os.path.abspath('.'))

sys.path.insert(0, os.path.abspath('..'))
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'

# cludge to allow documentation to be compiled without installing dependencies
class Dummy(object):
Expand Down Expand Up @@ -101,7 +102,7 @@ def __getattr__(self, name):
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#language = None
if 'LANG' in os.environ:
if not on_rtd and 'LANG' in os.environ:
language = os.environ['LANG'].split('_')[0]

locale_dirs = ['../pywws/lang']
Expand Down Expand Up @@ -142,7 +143,10 @@ def __getattr__(self, name):

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'default'
if on_rtd:
html_theme = 'default'
else:
html_theme = 'sphinx_rtd_theme'

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
Expand Down
2 changes: 1 addition & 1 deletion src/doc/essentials/dependencies.rst
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ To 'compile' the documentation

The documentation of pywws is written in "ReStructured text".
A program called Sphinx is used to convert this easy to write format into HTML for use with a web browser.
If you'd like to create a local copy of the documentation (so you don't have to rely on the online version, or to test a translation you're working on) you need to install Sphinx.
If you'd like to create a local copy of the documentation (so you don't have to rely on the online version, or to test a translation you're working on) you need to install Sphinx, version 1.3 or later.

* `Sphinx <http://sphinx-doc.org/>`_

Expand Down
6 changes: 3 additions & 3 deletions src/pywws/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
__version__ = '15.05.0.dev1292'
_release = '1292'
_commit = '0c0f69d'
__version__ = '15.05.0.dev1293'
_release = '1293'
_commit = '5727455'

0 comments on commit 6376d6f

Please sign in to comment.