From 470a90f24af9621d68b51fc2a34e6d80129211f5 Mon Sep 17 00:00:00 2001 From: Tin Lam Date: Sun, 5 Nov 2017 17:18:37 -0600 Subject: [PATCH] Update documentation Since OSH is an official project and the documentation is published to docs.o.o, this patch set updates the conf.py to update the theme to be inline with other openstack projects. Change-Id: I8e4a8d9e1d2098ef074c3d9503c5c81297f513a7 --- doc/source/_static/.placeholder | 0 doc/source/conf.py | 28 +++++++++++++++++++++------- test-requirements.txt | 1 + 3 files changed, 22 insertions(+), 7 deletions(-) create mode 100644 doc/source/_static/.placeholder diff --git a/doc/source/_static/.placeholder b/doc/source/_static/.placeholder new file mode 100644 index 0000000000..e69de29bb2 diff --git a/doc/source/conf.py b/doc/source/conf.py index d851547367..3631de159c 100755 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -20,14 +20,11 @@ sys.path.insert(0, os.path.abspath('../..')) # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. extensions = [ - 'sphinx.ext.autodoc' + 'sphinx.ext.autodoc', + 'openstackdocstheme', + 'oslosphinx' ] -on_rtd = os.environ.get('READTHEDOCS', None) == 'True' - -if not on_rtd: - extensions.append('oslosphinx') - # autodoc generation is a bit aggressive and a nuisance when doing heavy # text edit cycles. # execute "export SPHINX_DEBUG=1" in your terminal to disable @@ -49,10 +46,27 @@ add_function_parentheses = True # unit titles (such as .. function::). add_module_names = True +# If true, sectionauthor and moduleauthor directives will be shown in the +# output. They are ignored by default. +show_authors = True + # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'sphinx' # -- Options for HTML output -------------------------------------------------- +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +html_theme = 'openstackdocs' + +# 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'] + +# 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' +html_last_updated_fmt = '%Y-%m-%d %H:%M' # The theme to use for HTML and HTML Help pages. Major themes that come with # Sphinx are currently 'default' and 'sphinxdoc'. @@ -74,4 +88,4 @@ latex_documents = [ ] # Example configuration for intersphinx: refer to the Python standard library. -#intersphinx_mapping = {'http://docs.python.org/': None} +# intersphinx_mapping = {'http://docs.python.org/': None} diff --git a/test-requirements.txt b/test-requirements.txt index be7da6d268..b32d08c1f7 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,3 +1,4 @@ sphinx>=1.5.1,!=1.6.1 # BSD oslosphinx>=4.7.0 # Apache-2.0 pbr>=3.0.0 # Apache-2.0 +openstackdocstheme>=1.16.0 # Apache-2.0 \ No newline at end of file