spacetelescope/stsci_rtd_theme

Name: stsci_rtd_theme

Owner: Space Telescope Science Institute

Description: null

Created: 2017-06-06 00:16:39.0

Updated: 2017-06-06 00:17:47.0

Pushed: 2018-01-26 22:22:54.0

Homepage: null

Size: 264

Language: CSS

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

stsci_rtd_theme

STScI branded sphinx theme that inherits from sphinx_rtd_theme

This theme is based off of the sphinx_rtd_theme, from which it inherits, but the CSS styling has been altered for easier reading on a variety of platforms and browsers.

Installation

You can apply this theme to your current documents by installing this repository like any other python package:

Either from GIT:

clone https://github.com/spacetelescope/stsci_rtd_theme.git
on setup.py install

Or with PIP:

stall directly from the git repository
install -e https://github.com/spacetelescope/stsci_rtd_theme.git

stall from pypi release
install stsci_rtd_theme
Adding to your Sphinx docs

If you haven't already created your Sphinx documentation, you can start sphinx with sphinx-quickstart and follow the guided steps. When you are finished, add these lines to your conf.py file:

rt stsci_rtd_theme
_theme = 'stsci_rtd_theme'
_theme_path = [stsci_rtd_theme.get_html_theme_path()]

Example theme render

Making this theme work on Readthedocs

Add the following lines to your documentations conf.py file:

rt sphinx
rt stsci_rtd_theme

setup(app):
app.add_stylesheet("stsci.css")

e below is not strictly necessary but helps with extensions you may use across versions
 distutils.version import LooseVersion

td = os.environ.get('READTHEDOCS', None) == 'True'
n_rtd:
extensions.append('sphinx.ext.mathjax')
 LooseVersion(sphinx.__version__) < LooseVersion('1.4'):
extensions.append('sphinx.ext.pngmath')
:
extensions.append('sphinx.ext.imgmath')    

Finally, when setting up your documentation build on readthedocs, make sure to include a requirements file which installs this theme


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.