From b0ca782396530d5b43e28bdd0eb73296dd2b52c3 Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Sat, 8 Jul 2017 14:09:53 -0400 Subject: switch from oslosphinx to openstackdocstheme Change-Id: I7522d14d4e340f0882e41bed3528f90bbf74c2af Signed-off-by: Doug Hellmann --- doc/source/conf.py | 20 +++++++++----------- releasenotes/source/conf.py | 10 ++++++++-- setup.cfg | 2 +- 3 files changed, 18 insertions(+), 14 deletions(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index 98f84fb..338027a 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -17,9 +17,15 @@ extensions = [ 'sphinx.ext.extlinks', 'sphinx.ext.inheritance_diagram', 'sphinx.ext.viewcode', - 'oslosphinx' + 'openstackdocstheme' ] +# openstackdocstheme options +repository_name = 'openstack/taskflow' +bug_project = 'taskflow' +bug_tag = '' +html_last_updated_fmt = '%Y-%m-%d %H:%M' + # 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 @@ -66,20 +72,12 @@ extlinks = { # The theme to use for HTML and HTML Help pages. Major themes that come with # Sphinx are currently 'default' and 'sphinxdoc'. # html_theme_path = ["."] -# html_theme = '_theme' -html_static_path = ['static'] +html_theme = 'openstackdocs' +# html_static_path = ['static'] # Output file base name for HTML help builder. htmlhelp_basename = '%sdoc' % project -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".') - # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, documentclass # [howto/manual]). diff --git a/releasenotes/source/conf.py b/releasenotes/source/conf.py index c78d568..49272e9 100644 --- a/releasenotes/source/conf.py +++ b/releasenotes/source/conf.py @@ -38,10 +38,16 @@ # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ - 'oslosphinx', + 'openstackdocstheme', 'reno.sphinxext', ] +# openstackdocstheme options +repository_name = 'openstack/taskflow' +bug_project = 'taskflow' +bug_tag = '' +html_last_updated_fmt = '%Y-%m-%d %H:%M' + # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -112,7 +118,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 diff --git a/setup.cfg b/setup.cfg index 5ef3353..1c4ee3d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -68,7 +68,7 @@ eventlet = eventlet!=0.18.3,!=0.20.1,<0.21.0,>=0.18.2 # MIT doc = sphinx>=1.6.2 # BSD - oslosphinx>=4.7.0 # Apache-2.0 + openstackdocstheme>=1.11.0 # Apache-2.0 database = SQLAlchemy!=1.1.5,!=1.1.6,!=1.1.7,!=1.1.8,>=1.0.10 # MIT alembic>=0.8.10 # MIT -- cgit v1.2.1