Commit c1e120fb by Clinton Blackburn Committed by Clinton Blackburn

Using edX theme for documentation

ECOM-6420
parent cecf03c2
...@@ -14,14 +14,11 @@ ...@@ -14,14 +14,11 @@
from datetime import datetime from datetime import datetime
import os import os
import edx_theme
# on_rtd is whether we are on readthedocs.org # on_rtd is whether we are on readthedocs.org
on_rtd = os.environ.get('READTHEDOCS', None) == 'True' 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, # 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 # add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here. # documentation root, use os.path.abspath to make it absolute, like shown here.
...@@ -34,7 +31,9 @@ if not on_rtd: # only import and set the theme if we're building docs locally ...@@ -34,7 +31,9 @@ if not on_rtd: # only import and set the theme if we're building docs locally
# Add any Sphinx extension module names here, as strings. They can be extensions # Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones. # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = [] extensions = [
'edx_theme',
]
# Add any paths that contain templates here, relative to this directory. # Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates'] templates_path = ['_templates']
...@@ -50,7 +49,8 @@ master_doc = 'index' ...@@ -50,7 +49,8 @@ master_doc = 'index'
# General information about the project. # General information about the project.
project = u'E-Commerce Service' project = u'E-Commerce Service'
copyright = u'{year}, edX'.format(year=datetime.now().year) author = edx_theme.AUTHOR
copyright = edx_theme.COPYRIGHT
# The version info for the project you're documenting, acts as replacement for # The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the # |version| and |release|, also used in various other places throughout the
...@@ -100,7 +100,7 @@ pygments_style = 'sphinx' ...@@ -100,7 +100,7 @@ pygments_style = 'sphinx'
# The theme to use for HTML and HTML Help pages. See the documentation for # The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes. # a list of builtin themes.
# html_theme = 'sphinx_rtd_theme' html_theme = 'edx_theme'
# Theme options are theme-specific and customize the look and feel of a 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 # further. For a list of options available for each theme, see the
...@@ -108,7 +108,7 @@ pygments_style = 'sphinx' ...@@ -108,7 +108,7 @@ pygments_style = 'sphinx'
# html_theme_options = {} # html_theme_options = {}
# Add any paths that contain custom themes here, relative to this directory. # Add any paths that contain custom themes here, relative to this directory.
# html_theme_path = [] html_theme_path = [edx_theme.get_html_theme_path()]
# The name for this set of Sphinx documents. If None, it defaults to # The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation". # "<project> v<release> documentation".
......
# Packages required for building documentation edx-sphinx-theme==1.0.2
Sphinx==1.3.1 Sphinx==1.5.3
sphinx_rtd_theme==0.1.9
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment