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
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
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.
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
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()]
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