diff --git a/doc/requirements.txt b/doc/requirements.txt index 89491a5ef..44cc213fe 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -2,6 +2,7 @@ # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. +openstackdocstheme>=1.19.0 # Apache-2.0 reno!=2.3.1,>=1.8.0 # Apache-2.0 sphinx!=1.6.6,!=1.6.7,>=1.6.2,<2.0.0;python_version=='2.7' # BSD sphinx!=1.6.6,!=1.6.7,>=1.6.2;python_version>='3.4' # BSD diff --git a/doc/source/conf.py b/doc/source/conf.py index 8e1c62cff..d84d95700 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -26,6 +26,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +from kayobe.version import version_info as kayobe_version import os import sys @@ -35,6 +36,7 @@ sys.path.insert(0, os.path.abspath('../..')) # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. extensions = [ + 'openstackdocstheme', 'sphinx.ext.autodoc', #'sphinx.ext.intersphinx', # Uncomment this to enable the OpenStack documentation style, adding @@ -54,7 +56,17 @@ master_doc = 'index' # General information about the project. project = u'kayobe' -copyright = u'2017, StackHPC Ltd.' +copyright = u'2013, OpenStack Foundation' + +# 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. +# +# The short X.Y version. +# The full version, including alpha/beta/rc tags. +release = kayobe_version.version_string_with_vcs() +# The short X.Y version. +version = kayobe_version.canonical_version_string() # If true, '()' will be appended to :func: etc. cross-reference text. add_function_parentheses = True @@ -70,13 +82,16 @@ 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_path = ["."] -# html_theme = '_theme' +# html_theme_path = [] +html_theme = 'openstackdocs' # html_static_path = ['static'] # Output file base name for HTML help builder. htmlhelp_basename = '%sdoc' % project +# Must set this variable to include year, month, day, hours, and minutes. +html_last_updated_fmt = '%Y-%m-%d %H:%M' + # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, documentclass # [howto/manual]). @@ -87,5 +102,13 @@ latex_documents = [ u'OpenStack Foundation', 'manual'), ] -# Example configuration for intersphinx: refer to the Python standard library. -#intersphinx_mapping = {'http://docs.python.org/': None} +# openstackdocstheme options +# TODO(mgoddard): Change to openstack/kayobe. +repository_name = 'x/kayobe' +bug_project = 'kayobe' +bug_tag = '' +openstack_projects = [ + 'ironic', + 'kolla', + 'kolla-ansible', +] diff --git a/releasenotes/source/conf.py b/releasenotes/source/conf.py index 4a1385001..ce1f1e333 100644 --- a/releasenotes/source/conf.py +++ b/releasenotes/source/conf.py @@ -12,21 +12,12 @@ # See the License for the specific language governing permissions and # limitations under the License. -# Kayobe Release Notes documentation build configuration file. -# -# This file is execfile()d with the current directory set to its -# containing dir. -# -# Note that not all possible configuration values are present in this -# autogenerated file. -# -# All configuration values have a default; values that are commented out -# serve to show the default. -# 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 -# documentation root, use os.path.abspath to make it absolute, like shown here. -# sys.path.insert(0, os.path.abspath('.')) +import os +import sys + +sys.path.insert(0, os.path.abspath('../..')) + # -- General configuration ------------------------------------------------ @@ -37,6 +28,7 @@ # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ + 'openstackdocstheme', 'reno.sphinxext', ] @@ -56,10 +48,8 @@ master_doc = 'index' project = u'Kayobe Release Notes' copyright = u'2018, The Kayobe team' -# 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. -# +# Release notes do not need a version number in the title, they +# cover multiple releases. # The short X.Y version. version = '' # The full version, including alpha/beta/rc tags. @@ -106,10 +96,9 @@ pygments_style = 'sphinx' # -- Options for HTML output ---------------------------------------------- -# openstackdocstheme options -# repository_name = 'openstack/kayobe' -# bug_project = 'kayobe' -# bug_tag = '' +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +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 @@ -147,7 +136,7 @@ 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' # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. @@ -192,17 +181,6 @@ htmlhelp_basename = 'KayobeReleaseNotesdoc' # -- Options for LaTeX output --------------------------------------------- -latex_elements = { - # The paper size ('letterpaper' or 'a4paper'). - # 'papersize': 'letterpaper', - - # The font size ('10pt', '11pt' or '12pt'). - # 'pointsize': '10pt', - - # Additional stuff for the LaTeX preamble. - # 'preamble': '', -} - # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). @@ -272,3 +250,6 @@ texinfo_documents = [ # If true, do not generate a @detailmenu in the "Top" node's menu. # texinfo_no_detailmenu = False + +# -- Options for Internationalization output ------------------------------ +locale_dirs = ['locale/']