Skip to main content

stsci-rtd-theme

This is a Sphinx theme for packages maintained by the Space Telescope Sciences Institute (STScI).

Example

This theme inherits from sphinx-rtd-theme; however, 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 the latest release from PyPI:

pip install stsci-rtd-theme

If you need the most up-to-date version of the master branch, you can install directly from GitHub:

pip install https://github.com/spacetelescope/stsci_rtd_theme.git

If you wish to modify the source code, you should clone the repository locally and install editable (-e):

git clone https://github.com/spacetelescope/stsci_rtd_theme.git
cd stsci_rtd_theme
pip install -e .

Sphinx configuration

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 docs/conf.py file:

# docs/conf.py

import stsci_rtd_theme

html_theme = 'stsci_rtd_theme'
html_theme_path = [stsci_rtd_theme.get_html_theme_path()]

ReadTheDocs configuration

Add the following lines to your docs/conf.py file:

# docs/conf.py

import sphinx
import os
from packaging.version import Version


def setup(app):
    app.add_css_file("stsci.css")


extensions = [
    ...
]

on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
if on_rtd:
    extensions.append('sphinx.ext.mathjax')
elif Version(sphinx.__version__) < Version('1.4'):
    extensions.append('sphinx.ext.pngmath')
else:
    extensions.append('sphinx.ext.imgmath')

Finally, make sure to include stsci-rtd-theme to the docs extra, or alternatively add stsci-rtd-theme to a rtd-requirements.txt file. Then, in .readthedocs.yaml, include the following (depending on which of the two methods are used to define the stsci-rtd-theme dependency):

# .readthedocs.yaml
install:
  - method: pip
    path: .
    extra_requirements:
      - docs
# .readthedocs.yaml
install:
  - requirements: .rtd-requirements.txt
  - method: pip
    path: .

Metadata

Release files for stsci-rtd-theme 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for stsci-rtd-theme 1.0.1
File Size Uploaded Provenance Actions
stsci_rtd_theme-1.0.1.tar.gz 584.2 kB Without provenance Details for stsci_rtd_theme-1.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for stsci-rtd-theme 1.0.1
File Interpreter ABI Platform Actions
stsci_rtd_theme-1.0.1-py3-none-any.whl Python 3 none any Details for stsci_rtd_theme-1.0.1-py3-none-any.whl

Total release size: 978.0 kB

Release files / stsci_rtd_theme-1.0.1.tar.gz

Download URL stsci_rtd_theme-1.0.1.tar.gz
Size 584.2 kB
Tags Source
SHA-256 checksum
How to use checksums
d2e3bd8944114ca34f8e1dcf27efdb071ac2c1f987a6b115bc53a71648aff74e
BLAKE2b-256 checksum
How to use checksums
719faf56c4e7c1c18a3d3824054b451f7de8fcc55b8e0f6c3c79a81dff0be83f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.3

Release files / stsci_rtd_theme-1.0.1-py3-none-any.whl

Download URL stsci_rtd_theme-1.0.1-py3-none-any.whl
Size 393.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8270749ebcb3383b1ed96491ab429d144fefdd15a82b36e11e6e7a57e902712c
BLAKE2b-256 checksum
How to use checksums
cc393d4062c4678cdabe744fb2a8971dc09e9d4d59b2b4f8878bec887c6b9ef7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.3

Security for stsci-rtd-theme 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page