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:
parent
b19d871415
commit
532bfaf600
@ -12,9 +12,7 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import subprocess
|
|
||||||
import sys
|
import sys
|
||||||
import warnings
|
|
||||||
|
|
||||||
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
|
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
|
||||||
|
|
||||||
@ -32,15 +30,13 @@ extensions = [
|
|||||||
'sphinx.ext.autodoc',
|
'sphinx.ext.autodoc',
|
||||||
'sphinxcontrib.pecanwsme.rest',
|
'sphinxcontrib.pecanwsme.rest',
|
||||||
'wsmeext.sphinxext',
|
'wsmeext.sphinxext',
|
||||||
|
'openstackdocstheme',
|
||||||
]
|
]
|
||||||
|
|
||||||
if not on_rtd:
|
|
||||||
extensions.append('oslosphinx')
|
|
||||||
|
|
||||||
wsme_protocols = ['restjson']
|
wsme_protocols = ['restjson']
|
||||||
|
|
||||||
# Add any paths that contain templates here, relative to this directory.
|
# 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
|
# autodoc generation is a bit aggressive and a nuisance when doing heavy
|
||||||
# text edit cycles.
|
# text edit cycles.
|
||||||
@ -83,9 +79,7 @@ pygments_style = 'sphinx'
|
|||||||
# a list of builtin themes.
|
# a list of builtin themes.
|
||||||
# html_static_path = ['_static']
|
# html_static_path = ['_static']
|
||||||
|
|
||||||
if on_rtd:
|
html_theme = 'openstackdocs'
|
||||||
html_theme_path = ['.']
|
|
||||||
html_theme = 'sphinx_rtd_theme'
|
|
||||||
|
|
||||||
# Output file base name for HTML help builder.
|
# Output file base name for HTML help builder.
|
||||||
htmlhelp_basename = '%sdoc' % project
|
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,
|
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
|
||||||
# using the given strftime format.
|
# using the given strftime format.
|
||||||
# html_last_updated_fmt = '%b %d, %Y'
|
#html_last_updated_fmt = '%b %d, %Y'
|
||||||
git_cmd = ["git", "log", "--pretty=format:'%ad, commit %h'", "--date=local",
|
# Must set this variable to include year, month, day, hours, and minutes.
|
||||||
"-n1"]
|
html_last_updated_fmt = '%Y-%m-%d %H:%M'
|
||||||
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".')
|
|
||||||
|
|
||||||
# The name for this set of Sphinx documents. If None, it defaults to
|
# The name for this set of Sphinx documents. If None, it defaults to
|
||||||
# "<project> v<release> documentation".
|
# "<project> v<release> documentation".
|
||||||
@ -132,3 +120,8 @@ man_pages = [
|
|||||||
|
|
||||||
# If true, show URL addresses after external links.
|
# If true, show URL addresses after external links.
|
||||||
man_show_urls = True
|
man_show_urls = True
|
||||||
|
|
||||||
|
# -- Options for openstackdocstheme -------------------------------------------
|
||||||
|
repository_name = 'openstack/mistral'
|
||||||
|
bug_project = 'mistral'
|
||||||
|
bug_tag = ''
|
||||||
|
@ -37,12 +37,12 @@
|
|||||||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
||||||
# ones.
|
# ones.
|
||||||
extensions = [
|
extensions = [
|
||||||
'oslosphinx',
|
'openstackdocstheme',
|
||||||
'reno.sphinxext',
|
'reno.sphinxext',
|
||||||
]
|
]
|
||||||
|
|
||||||
# Add any paths that contain templates here, relative to this directory.
|
# Add any paths that contain templates here, relative to this directory.
|
||||||
templates_path = ['_templates']
|
# templates_path = ['_templates']
|
||||||
|
|
||||||
# The suffix of source filenames.
|
# The suffix of source filenames.
|
||||||
source_suffix = '.rst'
|
source_suffix = '.rst'
|
||||||
@ -111,7 +111,7 @@ pygments_style = 'sphinx'
|
|||||||
|
|
||||||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||||
# a list of builtin themes.
|
# 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
|
# 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
|
# 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,
|
# 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,
|
# relative to this directory. They are copied after the builtin static files,
|
||||||
# so a file named "default.css" will overwrite the builtin "default.css".
|
# 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
|
# Add any extra paths that contain custom files (such as robots.txt or
|
||||||
# .htaccess) here, relative to this directory. These files are copied
|
# .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,
|
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
|
||||||
# using the given strftime format.
|
# 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
|
# If true, SmartyPants will be used to convert quotes and dashes to
|
||||||
# typographically correct entities.
|
# typographically correct entities.
|
||||||
@ -273,3 +274,8 @@ texinfo_documents = [
|
|||||||
|
|
||||||
# -- Options for Internationalization output ------------------------------
|
# -- Options for Internationalization output ------------------------------
|
||||||
locale_dirs = ['locale/']
|
locale_dirs = ['locale/']
|
||||||
|
|
||||||
|
# -- Options for openstackdocstheme -------------------------------------------
|
||||||
|
repository_name = 'openstack/mistral'
|
||||||
|
bug_project = 'mistral'
|
||||||
|
bug_tag = ''
|
||||||
|
@ -5,7 +5,6 @@ coverage!=4.4,>=4.0 # Apache-2.0
|
|||||||
fixtures>=3.0.0 # Apache-2.0/BSD
|
fixtures>=3.0.0 # Apache-2.0/BSD
|
||||||
hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
|
hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
|
||||||
nose # LGPL
|
nose # LGPL
|
||||||
oslosphinx>=4.7.0 # Apache-2.0
|
|
||||||
oslotest>=1.10.0 # Apache-2.0
|
oslotest>=1.10.0 # Apache-2.0
|
||||||
os-api-ref>=1.0.0 # Apache-2.0
|
os-api-ref>=1.0.0 # Apache-2.0
|
||||||
pyflakes==0.8.1 # MIT
|
pyflakes==0.8.1 # MIT
|
||||||
|
Loading…
x
Reference in New Issue
Block a user