diff --git a/api-ref/source/conf.py b/api-ref/source/conf.py index c92859261a85..d5413b2ea628 100644 --- a/api-ref/source/conf.py +++ b/api-ref/source/conf.py @@ -23,23 +23,18 @@ # serve to show the default. import os -import subprocess import sys -import warnings -import openstackdocstheme extensions = [ + 'openstackdocstheme', 'os_api_ref', ] - html_theme = 'openstackdocs' -html_theme_path = [openstackdocstheme.get_html_theme_path()] html_theme_options = { "sidebar_mode": "toc", } -html_context = {'bug_project': 'nova', 'bug_tag': 'api-ref'} # 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 @@ -67,6 +62,11 @@ master_doc = 'index' project = u'Compute API Reference' copyright = u'2010-present, OpenStack Foundation' +# openstackdocstheme options +repository_name = 'openstack/nova' +bug_project = 'nova' +bug_tag = 'api-ref' + # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. @@ -150,14 +150,7 @@ pygments_style = 'sphinx' # 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' # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. diff --git a/placement-api-ref/source/conf.py b/placement-api-ref/source/conf.py index 80a4a5f96542..17267074252d 100644 --- a/placement-api-ref/source/conf.py +++ b/placement-api-ref/source/conf.py @@ -25,23 +25,18 @@ # serve to show the default. import os -import subprocess import sys -import warnings -import openstackdocstheme extensions = [ + 'openstackdocstheme', 'os_api_ref', ] - html_theme = 'openstackdocs' -html_theme_path = [openstackdocstheme.get_html_theme_path()] html_theme_options = { "sidebar_mode": "toc", } -html_context = {'bug_project': 'nova', 'bug_tag': 'placement-api-ref'} # 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 @@ -69,6 +64,11 @@ master_doc = 'index' project = u'Placement API Reference' copyright = u'2010-present, OpenStack Foundation' +# openstackdocstheme options +repository_name = 'openstack/nova' +bug_project = 'nova' +bug_tag = 'placement-api-ref' + # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. @@ -152,14 +152,7 @@ pygments_style = 'sphinx' # 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' # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities.