Skip to content

Commit

Permalink
Merge pull request #90 from coursera/develop
Browse files Browse the repository at this point in the history
read the docs support
  • Loading branch information
sb2nov committed Mar 20, 2015
2 parents 5bc0675 + 2726fc0 commit fb421d5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
16 changes: 12 additions & 4 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,15 @@

import sys
import os
import sphinx_rtd_theme

# 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()]


# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
Expand All @@ -34,7 +42,7 @@
'sphinx.ext.autodoc',
'sphinx.ext.doctest',
'sphinx.ext.coverage',
'sphinxcontrib.napoleon'
'sphinx.ext.napoleon'
]

# Napoleon settings
Expand Down Expand Up @@ -117,15 +125,15 @@

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'sphinx_rtd_theme'
# 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
# documentation.
#html_theme_options = {}

# Add any paths that contain custom themes here, relative to this directory.
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
# html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]

# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
Expand Down
1 change: 1 addition & 0 deletions read_the_docs.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Sphinx>=1.3.1

0 comments on commit fb421d5

Please sign in to comment.