Doc cleanups

Remove settings that openstackdocstheme sets by default.
Fix logabug feature for api-ref.

Change-Id: I877bb4c5d32352514ef17ca50b66cb8b2b6f0ba9
This commit is contained in:
Andreas Jaeger 2020-02-23 18:11:47 +01:00
parent 00816aab31
commit 7847d94554
4 changed files with 10 additions and 47 deletions

View File

@ -26,24 +26,22 @@
# serve to show the default.
import os
import subprocess
import sys
import warnings
import openstackdocstheme
from searchlight.version import version_info
html_theme = 'openstackdocs'
html_theme_path = [openstackdocstheme.get_html_theme_path()]
html_theme_options = {
"sidebar_mode": "toc",
}
extensions = [
'os_api_ref',
'openstackdocstheme'
]
repository_name = 'openstack/searchlight'
bug_project = 'searchlight'
bug_tag = 'searchlight'
# 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
# documentation root, use os.path.abspath to make it absolute, like shown here.
@ -70,20 +68,6 @@ master_doc = 'index'
project = u'Search Service API Reference'
copyright = u'2015-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 full version, including alpha/beta/rc tags.
release = version_info.release_string()
# The short X.Y version.
version = version_info.version_string()
# html_context allows us to pass arbitrary values into the html template
html_context = {"bug_tag": "api-ref",
"bug_project": "searchlight"}
# for a list of supported languages.
#
# language = None
@ -154,18 +138,6 @@ pygments_style = 'sphinx'
# 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

@ -1,6 +1,5 @@
# Documentation
sphinx>=1.8.0,<2.0.0;python_version=='2.7' # BSD
sphinx>=1.8.0,!=2.1.0;python_version>='3.4' # BSD
sphinx>=1.8.0,!=2.1.0 # BSD
openstackdocstheme>=1.30.0 # Apache-2.0
os-api-ref>=1.4.0 # Apache-2.0
reno>=2.5.0 # Apache-2.0

View File

@ -27,7 +27,6 @@
# serve to show the default.
import os
import subprocess
import sys
# If extensions (or modules to document with autodoc) are in another directory,

View File

@ -58,6 +58,10 @@ master_doc = 'index'
project = u'Searchlight Release Notes'
copyright = u'2015, OpenStack Foundation'
repository_name = 'openstack/searchlight'
bug_project = 'searchlight'
bug_tag = 'searchlight'
# Release notes are version independent.
# The short X.Y version.
@ -192,17 +196,6 @@ htmlhelp_basename = 'SearchlightReleaseNotesdoc'
# -- Options for LaTeX output ---------------------------------------------
latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
# 'papersize': 'letterpaper',
# The font size ('10pt', '11pt' or '12pt').
# 'pointsize': '10pt',
# Additional stuff for the LaTeX preamble.
# 'preamble': '',
}
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).