From e98ad87c78a5e5bf1dc08aed1b2c41b023fd17f7 Mon Sep 17 00:00:00 2001 From: zhurong Date: Sat, 24 Jun 2017 09:46:31 +0800 Subject: [PATCH] switch to openstackdocstheme Change-Id: I6e019f7efe7c8bc5680b41e6e09a9ef9174f0a05 --- doc/source/_static/.placeholder | 0 doc/source/_templates/.placeholder | 0 doc/source/_theme/theme.conf | 2 -- doc/source/conf.py | 24 +++++++++++------------- releasenotes/source/conf.py | 6 ++++-- test-requirements.txt | 2 +- 6 files changed, 16 insertions(+), 18 deletions(-) delete mode 100755 doc/source/_static/.placeholder delete mode 100755 doc/source/_templates/.placeholder delete mode 100755 doc/source/_theme/theme.conf diff --git a/doc/source/_static/.placeholder b/doc/source/_static/.placeholder deleted file mode 100755 index e69de29..0000000 diff --git a/doc/source/_templates/.placeholder b/doc/source/_templates/.placeholder deleted file mode 100755 index e69de29..0000000 diff --git a/doc/source/_theme/theme.conf b/doc/source/_theme/theme.conf deleted file mode 100755 index 9a8facf..0000000 --- a/doc/source/_theme/theme.conf +++ /dev/null @@ -1,2 +0,0 @@ -[theme] -inherit = default \ No newline at end of file diff --git a/doc/source/conf.py b/doc/source/conf.py index 1f971d1..b137e3a 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -13,28 +13,22 @@ import os +import openstackdocstheme + project = 'python-muranoclient' # -- General configuration ---------------------------------------------------- # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. -extensions = ['sphinx.ext.autodoc', - 'sphinx.ext.intersphinx', - 'sphinx.ext.coverage', - 'sphinx.ext.ifconfig', - 'sphinx.ext.graphviz'] +extensions = ['sphinx.ext.autodoc'] # 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 # Add any paths that contain templates here, relative to this directory. -templates_path = [] -if os.getenv('HUDSON_PUBLISH_DOCS'): - templates_path = ['_ga', '_templates'] -else: - templates_path = ['_templates'] +templates_path = ['_templates'] # The suffix of source filenames. source_suffix = '.rst' @@ -43,7 +37,7 @@ source_suffix = '.rst' master_doc = 'index' # General information about the project. -copyright = u'Mirantis, Inc' +copyright = u'OpenStack Foundation' exclude_trees = ['api'] # If true, '()' will be appended to :func: etc. cross-reference text. @@ -60,7 +54,11 @@ pygments_style = 'sphinx' # The theme to use for HTML and HTML Help pages. Major themes that come with # Sphinx are currently 'default' and 'sphinxdoc'. -html_theme = 'default' +html_theme = 'openstackdocs' + +# Add any paths that contain custom themes here, relative to this directory. +#html_theme_path = ['_theme'] +html_theme_path = [openstackdocstheme.get_html_theme_path()] # Output file base name for HTML help builder. htmlhelp_basename = '%sdoc' % project @@ -74,7 +72,7 @@ latex_documents = [ 'index', '%s.tex' % project, u'%s Documentation' % project, - u'Mirantis, Inc', + u'OpenStack Foundation', 'manual' ), ] diff --git a/releasenotes/source/conf.py b/releasenotes/source/conf.py index 5b9470f..95f2e8c 100644 --- a/releasenotes/source/conf.py +++ b/releasenotes/source/conf.py @@ -29,6 +29,8 @@ # documentation root, use os.path.abspath to make it absolute, like shown here. # sys.path.insert(0, os.path.abspath('.')) +import openstackdocstheme + # -- General configuration ------------------------------------------------ # If your documentation needs a minimal Sphinx version, state it here. @@ -38,7 +40,6 @@ # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ - 'oslosphinx', 'reno.sphinxext', ] @@ -112,7 +113,7 @@ pygments_style = 'sphinx' # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -html_theme = 'default' +html_theme = 'openstackdocs' # 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 @@ -121,6 +122,7 @@ html_theme = 'default' # Add any paths that contain custom themes here, relative to this directory. # html_theme_path = [] +html_theme_path = [openstackdocstheme.get_html_theme_path()] # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". diff --git a/test-requirements.txt b/test-requirements.txt index 8ceca1d..958b626 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -14,6 +14,6 @@ testtools>=1.4.0 # MIT oslotest>=1.10.0 # Apache-2.0 # doc build requirements -oslosphinx>=4.7.0 # Apache-2.0 +openstackdocstheme>=1.5.0 # Apache-2.0 sphinx!=1.6.1,>=1.5.1 # BSD reno!=2.3.1,>=1.8.0 # Apache-2.0