Switch from oslosphinx to openstackdocstheme

As part of the docs migration work[0] for Pike we need to switch to use
the openstackdocstheme.

[0]https://review.openstack.org/#/c/472275/

Change-Id: Ic0686fc1f1128d52c2ffb195d3cedb30de6f9c73
This commit is contained in:
Sharat Sharma 2017-07-03 17:20:05 +05:30
parent b19d871415
commit 532bfaf600
3 changed files with 22 additions and 24 deletions

View File

@ -12,9 +12,7 @@
# limitations under the License.
import os
import subprocess
import sys
import warnings
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
@ -32,15 +30,13 @@ extensions = [
'sphinx.ext.autodoc',
'sphinxcontrib.pecanwsme.rest',
'wsmeext.sphinxext',
'openstackdocstheme',
]
if not on_rtd:
extensions.append('oslosphinx')
wsme_protocols = ['restjson']
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# templates_path = ['_templates']
# autodoc generation is a bit aggressive and a nuisance when doing heavy
# text edit cycles.
@ -83,9 +79,7 @@ pygments_style = 'sphinx'
# a list of builtin themes.
# html_static_path = ['_static']
if on_rtd:
html_theme_path = ['.']
html_theme = 'sphinx_rtd_theme'
html_theme = 'openstackdocs'
# Output file base name for HTML help builder.
htmlhelp_basename = '%sdoc' % project
@ -95,15 +89,9 @@ modindex_common_prefix = ['mistral.']
# 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 = '%b %d, %Y'
# Must set this variable to include year, month, day, hours, and minutes.
html_last_updated_fmt = '%Y-%m-%d %H:%M'
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
@ -132,3 +120,8 @@ man_pages = [
# If true, show URL addresses after external links.
man_show_urls = True
# -- Options for openstackdocstheme -------------------------------------------
repository_name = 'openstack/mistral'
bug_project = 'mistral'
bug_tag = ''

View File

@ -37,12 +37,12 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'oslosphinx',
'openstackdocstheme',
'reno.sphinxext',
]
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# templates_path = ['_templates']
# The suffix of source filenames.
source_suffix = '.rst'
@ -111,7 +111,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
@ -140,7 +140,7 @@ html_theme = 'default'
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
# html_static_path = ['_static']
# Add any extra paths that contain custom files (such as robots.txt or
# .htaccess) here, relative to this directory. These files are copied
@ -149,7 +149,8 @@ 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'
# Must set this variable to include year, month, day, hours, and minutes.
html_last_updated_fmt = '%Y-%m-%d %H:%M'
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
@ -273,3 +274,8 @@ texinfo_documents = [
# -- Options for Internationalization output ------------------------------
locale_dirs = ['locale/']
# -- Options for openstackdocstheme -------------------------------------------
repository_name = 'openstack/mistral'
bug_project = 'mistral'
bug_tag = ''

View File

@ -5,7 +5,6 @@ coverage!=4.4,>=4.0 # Apache-2.0
fixtures>=3.0.0 # Apache-2.0/BSD
hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
nose # LGPL
oslosphinx>=4.7.0 # Apache-2.0
oslotest>=1.10.0 # Apache-2.0
os-api-ref>=1.0.0 # Apache-2.0
pyflakes==0.8.1 # MIT