Sphinx theme for RST-sourced documentation published to docs.openstack.org
Go to file
Andreas Jaeger de9834dff4 Rename pep8 to linters test
The pep8 tests often does more than calling pep8, rename it to use the new
linters standard job for all lint like jobs.

Change-Id: I5b8ce374b1c4de88dea0a44ee89c6b91690759df
Depends-On: I7cf4766642dc3e7d7652e6d26ab2f14f9fcd7861
2016-01-20 21:38:29 +01:00
doc/source Replace deprecated library function os.popen() with subprocess 2016-01-14 05:19:11 -08:00
openstackdocstheme Merge "Remove feedback formular from the footer" 2016-01-20 14:39:03 +00:00
releasenotes Fix sidebar for developer.openstack.org 2015-12-12 19:21:02 +01:00
.gitignore Add reno for release-notes 2015-11-10 08:37:48 +01:00
.gitreview add a .gitreview file 2015-02-03 12:28:09 -05:00
CONTRIBUTING.rst Starting point for Sphinx theme for docs.openstack.org content 2015-01-20 10:49:21 -06:00
HACKING.rst Starting point for Sphinx theme for docs.openstack.org content 2015-01-20 10:49:21 -06:00
LICENSE Starting point for Sphinx theme for docs.openstack.org content 2015-01-20 10:49:21 -06:00
Makefile Starting point for Sphinx theme for docs.openstack.org content 2015-01-20 10:49:21 -06:00
README.rst Replace deprecated library function os.popen() with subprocess 2016-01-14 05:19:11 -08:00
RELEASENOTES.rst Update RELEASENOTES for 1.2.4 release 2015-10-12 12:34:17 +02:00
index.rst Adds working links to navigation dropdown and column 2015-01-28 10:16:40 -06:00
requirements.txt Updated from global requirements 2016-01-16 03:30:44 +00:00
setup.cfg Drop python classifiers from setup.cfg file 2016-01-14 01:58:56 +00:00
setup.py Updated from global requirements 2015-12-23 00:36:03 +00:00
test-requirements.txt Updated from global requirements 2016-01-16 03:30:44 +00:00
tox.ini Rename pep8 to linters test 2016-01-20 21:38:29 +01:00

README.rst

OpenStack docs.openstack.org Sphinx Theme

Theme and extension support for Sphinx documentation that is published to docs.openstack.org. Intended for use by OpenStack projects.

Using the Theme

Prior to using this theme, ensure your project can use the OpenStack brand by referring to the brand guidelines at http://www.openstack.org/brand.

Update the requirements list for your project to include openstackdocstheme (usually in test-requirements.txt).

If your project previously used the oslosphinx theme (without modifying the header navigation), remove oslosphinx from your requirements list, and then in your conf.py you can remove the import statement and extension listing for oslosphinx.

Some of the settings below are included in the file generated by Sphinx when you initialize a project, so they may already have values that need to be changed.

Then modify your Sphinx settings in conf.py to include:

import openstackdocstheme

html_theme = 'openstackdocs'
html_theme_path = [openstackdocstheme.get_html_theme_path()]

Also, you must include these variables so that the "Log a bug" link sends metadata for the project where the docs reside:

# We ask git for the SHA checksum
# The git SHA checksum is used by "log-a-bug"
git_cmd = ["/usr/bin/git", "rev-parse", "HEAD"]
gitsha = subprocess.Popen(
    git_cmd, stdout=subprocess.PIPE).communicate()[0].strip('\n')
# tag that reported bugs will be tagged with
bug_tag = "your-chosen-tag"
# source tree
pwd = os.getcwd()
# html_context allows us to pass arbitrary values into the html template
html_context = {"pwd": pwd, "gitsha": gitsha}
# Must set this variable to include year, month, day, hours, and minutes.
html_last_updated_fmt = '%Y-%m-%d %H:%M'