Use oslosphinx when not building on read-the-docs
By default, we'll use the OpenStack documentation theme (oslosphinx) when building anywhere but on the read-the-docs site. If we're building on RTD then we'll use their preferred theme. Change-Id: I58369177160d8685f0de8382132bc2320928b376
This commit is contained in:
parent
950207a2bb
commit
f235fe5106
@ -13,7 +13,6 @@
|
||||
import os
|
||||
import sys
|
||||
import datetime
|
||||
import openstackdocstheme
|
||||
|
||||
sys.path.insert(0, os.path.abspath('../..'))
|
||||
# -- General configuration ----------------------------------------------------
|
||||
@ -22,6 +21,12 @@ sys.path.insert(0, os.path.abspath('../..'))
|
||||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
|
||||
extensions = []
|
||||
|
||||
# Executing on Read The Docs?
|
||||
on_rtd = os.environ.get('READTHEDOCS') == 'True'
|
||||
|
||||
if not on_rtd:
|
||||
extensions.append("oslosphinx")
|
||||
|
||||
# autodoc generation is a bit aggressive and a nuisance when doing heavy
|
||||
# text edit cycles.
|
||||
# execute "export SPHINX_DEBUG=1" in your terminal to disable
|
||||
@ -33,8 +38,10 @@ source_suffix = '.rst'
|
||||
master_doc = 'index'
|
||||
|
||||
# General information about the project.
|
||||
project = u'OpenStack Browbeat'
|
||||
project = u'Browbeat'
|
||||
copyright = u"%d, OpenStack Foundation" % datetime.datetime.now().year
|
||||
bug_tracker = u'Launchpad'
|
||||
bug_tracker_uri = u'https://launchpad.net/openstack-browbeat'
|
||||
|
||||
# If true, '()' will be appended to :func: etc. cross-reference text.
|
||||
add_function_parentheses = True
|
||||
@ -48,11 +55,6 @@ pygments_style = 'sphinx'
|
||||
|
||||
# -- Options for HTML output --------------------------------------------------
|
||||
|
||||
# The theme to use for HTML and HTML Help pages. Major themes that come with
|
||||
# Sphinx are currently 'default' and 'sphinxdoc'.
|
||||
html_theme = 'openstackdocs'
|
||||
html_theme_path = [openstackdocstheme.get_html_theme_path()]
|
||||
|
||||
# Output file base name for HTML help builder.
|
||||
htmlhelp_basename = '%sdoc' % project
|
||||
|
||||
|
@ -7,8 +7,10 @@ hacking<0.11,>=0.10.0
|
||||
ansible-lint
|
||||
coverage>=3.6
|
||||
python-subunit>=0.0.18
|
||||
sphinx!=1.2.0,!=1.3b1,<1.3,>=1.1.2
|
||||
sphinx>=1.3
|
||||
oslosphinx>=2.5.0 # Apache-2.0
|
||||
oslotest>=1.10.0 # Apache-2.0
|
||||
sphinx_rtd_theme
|
||||
testrepository>=0.0.18
|
||||
testscenarios>=0.4
|
||||
testtools>=1.4.0
|
||||
openstackdocstheme
|
||||
|
Loading…
Reference in New Issue
Block a user