From ead7d16f1179c741767f2eced973335ef2aaff2d Mon Sep 17 00:00:00 2001 From: gord chung Date: Wed, 21 Jun 2017 18:39:06 +0000 Subject: [PATCH] switch to openstackdocstheme Change-Id: I64cc7124cab48ea8a53ace957efe20d2b68ef2ef --- doc/source/conf.py | 21 +++++++++------------ releasenotes/source/conf.py | 13 +++++++++---- setup.cfg | 5 ++--- 3 files changed, 20 insertions(+), 19 deletions(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index 9995e062b..56c7e0456 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -40,13 +40,12 @@ os.environ['DJANGO_SETTINGS_MODULE'] = 'openstack_dashboard.settings' # They can be extensions coming with Sphinx (named 'sphinx.ext.*') # or your custom ones. extensions = [ + 'openstackdocstheme', 'sphinx.ext.autodoc', - 'sphinxcontrib.autohttp.flask', 'wsmeext.sphinxext', 'sphinx.ext.coverage', 'sphinx.ext.viewcode', 'sphinxcontrib.pecanwsme.rest', - 'oslosphinx', 'stevedore.sphinxext', 'oslo_config.sphinxconfiggen', ] @@ -122,7 +121,7 @@ nitpicky = False # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # html_theme_path = ['.'] -# html_theme = '_theme' +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 @@ -132,7 +131,7 @@ html_theme_options = { } # 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". @@ -157,14 +156,12 @@ html_static_path = ['_static'] # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. -#html_last_updated_fmt = '%b %d, %Y' -git_cmd = ["git", "log", "--pretty=format:'%ad, commit %h'", "--date=local", - "-n1"] -try: - html_last_updated_fmt = subprocess.check_output(git_cmd).decode('utf-8') -except Exception: - warnings.warn('Cannot get last updated time from git repository. ' - 'Not setting "html_last_updated_fmt".') +html_last_updated_fmt = '%Y-%m-%d %H:%M' + +# openstackdocstheme options +repository_name = 'openstack/aodh' +bug_project = 'aodh' +bug_tag = '' # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. diff --git a/releasenotes/source/conf.py b/releasenotes/source/conf.py index 365538b6c..4251f2e99 100644 --- a/releasenotes/source/conf.py +++ b/releasenotes/source/conf.py @@ -38,7 +38,7 @@ # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ - 'oslosphinx', + 'openstackdocstheme', 'reno.sphinxext', ] @@ -113,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,7 +121,7 @@ html_theme = 'default' # html_theme_options = {} # 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". @@ -151,7 +151,12 @@ html_static_path = ['_static'] # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. -# html_last_updated_fmt = '%b %d, %Y' +html_last_updated_fmt = '%Y-%m-%d %H:%M' + +# openstackdocstheme options +repository_name = 'openstack/aodh' +bug_project = 'aodh' +bug_tag = '' # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. diff --git a/setup.cfg b/setup.cfg index 4a958f260..19953c421 100644 --- a/setup.cfg +++ b/setup.cfg @@ -45,12 +45,11 @@ zaqar = python-zaqarclient>=1.2.0 doc = - oslosphinx>=2.5.0 # Apache-2.0 + openstackdocstheme>=1.11.0 # Apache-2.0 reno>=0.1.1 # Apache2 - sphinx!=1.2.0,!=1.3b1,<1.3,>=1.1.2 + sphinx>=1.6.2 sphinxcontrib-httpdomain sphinxcontrib-pecanwsme>=0.8 - openstackdocstheme>=1.0.3 # Apache-2.0 test = pifpaf>=0.1.0