doc: switch to openstackdocstheme and add metadata
Move doc/ and releasenotes/ to openstackdocstheme and remove the dependency on oslosphinx. Initialize the correct link to the bug tracker (logABug). api-ref/ was already properly configured. Change-Id: I9c0a8ae25b767d895ca5935fa305425f7b8e7ae0
This commit is contained in:
parent
977d06c614
commit
ddc87b149f
@ -20,7 +20,7 @@ import subprocess
|
||||
import sys
|
||||
import warnings
|
||||
|
||||
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
|
||||
import openstackdocstheme
|
||||
|
||||
# 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
|
||||
@ -32,6 +32,8 @@ sys.path.append(os.path.abspath('../bin'))
|
||||
|
||||
# -- General configuration -----------------------------------------------------
|
||||
|
||||
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
|
||||
|
||||
# If your documentation needs a minimal Sphinx version, state it here.
|
||||
#needs_sphinx = '1.0'
|
||||
|
||||
@ -40,10 +42,6 @@ sys.path.append(os.path.abspath('../bin'))
|
||||
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.todo', 'sphinx.ext.coverage',
|
||||
'sphinx.ext.viewcode', 'sphinxcontrib.httpdomain']
|
||||
|
||||
if not on_rtd:
|
||||
extensions.append('oslosphinx')
|
||||
extensions.append('oslo_config.sphinxconfiggen')
|
||||
|
||||
config_generator_config_file = 'config-generator.conf'
|
||||
config_sample_basename = 'sahara'
|
||||
|
||||
@ -117,6 +115,9 @@ if on_rtd:
|
||||
html_theme_path = ['.']
|
||||
html_theme = '_theme_rtd'
|
||||
|
||||
html_theme = 'openstackdocs'
|
||||
html_theme_path = [openstackdocstheme.get_html_theme_path()]
|
||||
|
||||
# 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.
|
||||
@ -157,6 +158,14 @@ except Exception:
|
||||
warnings.warn('Cannot get last updated time from git repository. '
|
||||
'Not setting "html_last_updated_fmt".')
|
||||
|
||||
giturl = u'http://git.openstack.org/cgit/openstack/sahara/tree/doc/source'
|
||||
# html_context allows us to pass arbitrary values into the html template
|
||||
html_context = {
|
||||
"bug_tag": "doc",
|
||||
"giturl": giturl,
|
||||
"bug_project": "sahara"
|
||||
}
|
||||
|
||||
# If true, SmartyPants will be used to convert quotes and dashes to
|
||||
# typographically correct entities.
|
||||
#html_use_smartypants = True
|
||||
|
@ -14,8 +14,10 @@
|
||||
|
||||
# Sahara Release Notes documentation build configuration file
|
||||
|
||||
import openstackdocstheme
|
||||
|
||||
|
||||
extensions = [
|
||||
'oslosphinx',
|
||||
'reno.sphinxext',
|
||||
]
|
||||
|
||||
@ -55,7 +57,8 @@ 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'
|
||||
html_theme_path = [openstackdocstheme.get_html_theme_path()]
|
||||
|
||||
# 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
|
||||
@ -86,6 +89,16 @@ html_theme = 'default'
|
||||
# so a file named "default.css" will overwrite the builtin "default.css".
|
||||
html_static_path = ['_static']
|
||||
|
||||
giturl = (
|
||||
u'http://git.openstack.org/cgit/openstack/sahara/tree/releasenotes/source'
|
||||
)
|
||||
# html_context allows us to pass arbitrary values into the html template
|
||||
html_context = {
|
||||
"bug_tag": "releasenotes",
|
||||
"giturl": giturl,
|
||||
"bug_project": "sahara"
|
||||
}
|
||||
|
||||
# Add any extra paths that contain custom files (such as robots.txt or
|
||||
# .htaccess) here, relative to this directory. These files are copied
|
||||
# directly to the root of the documentation.
|
||||
|
@ -11,7 +11,7 @@ coverage!=4.4,>=4.0 # Apache-2.0
|
||||
doc8 # Apache-2.0
|
||||
fixtures>=3.0.0 # Apache-2.0/BSD
|
||||
mock>=2.0 # BSD
|
||||
oslosphinx>=4.7.0 # Apache-2.0
|
||||
openstackdocstheme>=1.5.0 # Apache-2.0
|
||||
oslotest>=1.10.0 # Apache-2.0
|
||||
os-api-ref>=1.0.0 # Apache-2.0
|
||||
os-testr>=0.8.0 # Apache-2.0
|
||||
|
Loading…
Reference in New Issue
Block a user