doc: migrate to openstackdocstheme

Both doc/ and releasenotes/
Change-Id: Ic9a5d593053364e8b10f022b53cb0ab2587431b0
This commit is contained in:
Luigi Toscano 2017-07-13 19:09:43 +02:00
parent 76f056899c
commit 586a306358
3 changed files with 17 additions and 17 deletions

View File

@ -40,10 +40,14 @@ sys.path.append(os.path.abspath('../bin'))
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.todo',
'sphinx.ext.coverage',
'sphinx.ext.viewcode', 'ext.cli']
'sphinx.ext.viewcode', 'ext.cli',
'openstackdocstheme']
if not on_rtd:
extensions.append('oslosphinx')
# openstackdocstheme options
repository_name = 'openstack/python-saharaclient'
bug_project = 'python-saharaclient'
bug_tag = 'doc'
html_last_updated_fmt = '%Y-%m-%d %H:%M'
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
@ -110,6 +114,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 = 'openstackdocs'
if on_rtd:
html_theme_path = ['.']
@ -144,17 +149,6 @@ html_title = 'Sahara Client'
# so a file named "default.css" will overwrite the builtin "default.css".
# 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".')
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
#html_use_smartypants = True

View File

@ -15,10 +15,16 @@
# Sahara Client Release Notes documentation build configuration file
extensions = [
'oslosphinx',
'reno.sphinxext',
'openstackdocstheme'
]
# openstackdocstheme options
repository_name = 'openstack/python-saharaclient'
bug_project = 'python-saharaclient'
bug_tag = 'releasenotes'
html_last_updated_fmt = '%Y-%m-%d %H:%M'
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
@ -55,7 +61,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

View File

@ -6,7 +6,7 @@ hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
coverage!=4.4,>=4.0 # Apache-2.0
mock>=2.0 # BSD
oslosphinx>=4.7.0 # Apache-2.0
openstackdocstheme>=1.11.0 # Apache-2.0
oslotest>=1.10.0 # Apache-2.0
os-testr>=0.8.0 # Apache-2.0
reno!=2.3.1,>=1.8.0 # Apache-2.0