Bump the openstackdocstheme extension to 1.20
Some options are now automatically configured by the version 1.20: - project - html_last_updated_fmt - latex_engine - latex_elements - version - release. This will show other versions of the doc, too. Change-Id: I7d0a1b4e6cbb65e92eb332349e87c8896680e716
This commit is contained in:
parent
ae09b39f55
commit
2d455849b1
@ -25,11 +25,7 @@
|
||||
# serve to show the default.
|
||||
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
import warnings
|
||||
|
||||
import openstackdocstheme
|
||||
|
||||
|
||||
# If extensions (or modules to document with autodoc) are in another directory,
|
||||
@ -38,7 +34,7 @@ import openstackdocstheme
|
||||
sys.path = [
|
||||
os.path.abspath('../..'),
|
||||
os.path.abspath('../../bin')
|
||||
] + sys.path
|
||||
] + sys.path
|
||||
|
||||
# -- General configuration ---------------------------------------------------
|
||||
|
||||
@ -65,7 +61,6 @@ extensions = ['sphinx.ext.coverage',
|
||||
repository_name = 'openstack/cloudkitty'
|
||||
bug_project = 'cloudkitty'
|
||||
bug_tag = ''
|
||||
html_last_updated_fmt = '%Y-%m-%d %H:%M'
|
||||
|
||||
policy_generator_config_file = '../../etc/oslo-policy-generator/cloudkitty.conf'
|
||||
sample_policy_basename = '_static/cloudkitty'
|
||||
@ -83,19 +78,12 @@ source_suffix = '.rst'
|
||||
master_doc = 'index'
|
||||
|
||||
# General information about the project.
|
||||
project = u'Cloudkitty'
|
||||
copyright = u'2014-present, 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.
|
||||
from cloudkitty.version import version_info as cloudkitty_version
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = cloudkitty_version.version_string_with_vcs()
|
||||
# The short X.Y version.
|
||||
version = cloudkitty_version.canonical_version_string()
|
||||
# done by the openstackdocstheme ext
|
||||
#project = u'Cloudkitty'
|
||||
#release = cloudkitty_version.version_string_with_vcs()
|
||||
#version = cloudkitty_version.canonical_version_string()
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
@ -156,11 +144,13 @@ 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
|
||||
# documentation.
|
||||
#html_theme_options = {}
|
||||
html_theme_options = {
|
||||
"show_other_versions": "True",
|
||||
}
|
||||
|
||||
# Add any paths that contain custom themes here, relative to this directory.
|
||||
#html_theme_path = ['_theme']
|
||||
html_theme_path = [openstackdocstheme.get_html_theme_path()]
|
||||
#html_theme_path = [openstackdocstheme.get_html_theme_path()]
|
||||
|
||||
# The name for this set of Sphinx documents. If None, it defaults to
|
||||
# "<project> v<release> documentation".
|
||||
@ -186,13 +176,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'
|
||||
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
|
||||
|
@ -28,7 +28,6 @@ testscenarios>=0.4
|
||||
testrepository>=0.0.18
|
||||
mock>=1.2
|
||||
sphinx!=1.2.0,!=1.3b1,<1.3,>=1.1.2
|
||||
oslosphinx>=2.5.0 # Apache-2.0
|
||||
oslotest>=1.10.0 # Apache-2.0
|
||||
sphinxcontrib-httpdomain
|
||||
sphinxcontrib-pecanwsme>=0.8
|
||||
|
@ -13,7 +13,7 @@ testscenarios>=0.4 # Apache-2.0/BSD
|
||||
stestr>=2.0.0 # Apache-2.0
|
||||
mock>=1.2 # BSD
|
||||
sphinx>=1.6.2 # BSD
|
||||
openstackdocstheme>=1.11.0 # Apache-2.0
|
||||
openstackdocstheme>=1.20.0 # Apache-2.0
|
||||
oslotest>=1.10.0 # Apache-2.0
|
||||
sphinxcontrib-httpdomain # BSD
|
||||
sphinxcontrib-pecanwsme>=0.8 # Apache-2.0
|
||||
|
Loading…
x
Reference in New Issue
Block a user