Skip to main content

Bootstrap-based Sphinx theme from the napari community

Project description

napari-sphinx-theme

Code style: Ruff

A Sphinx theme with the look and feel of napari based on the awesome pydata-sphinx-theme.

Description

Since the napari-sphinx-theme extends the pydata-sphinx-theme, the configurations and affordances provided by the PyData Sphinx Theme can be used within the napari docs.

Installation

After creating a virtual environment, install the theme in editable mode:

python -m pip install -e . --group dev

For local development with uv, the shortest path is:

uv sync

Theme development

Configuration options

Modify options in theme.conf to customize the pydata-sphinx-theme for napari.

Styling (CSS)

Styling settings and napari's custom CSS is found in the static/css/napari-sphinx-theme.css file.

The styling of code snippets is configured in napari_sphinx_theme/napari_code_theme.py.

Templates (HTML)

To modify page layouts, modify the html template files in the napari_sphinx_theme and napari_sphinx_theme/partials directories.

Build demo docs and theme changes

To build the demo site found in this repo, run from the repository root:

uv run make docs

To start a live preview that rebuilds when you edit the docs or theme files, run:

uv run make docs-live

The live server opens a browser automatically and watches both docs/ and napari_sphinx_theme/. CSS, templates, and theme configuration changes are displayed automatically without having to restart the live server.

Build a distribution wheel for local testing

To build a wheel locally, run:

uv run make build

Use the demo site to manually test changes to styles and page layouts.

The napari website

The napari website is built using the napari docs repo. The styling of the website is based on this theme. Install this theme as a dependency in the napari docs repo.

To modify the website's styling, minor changes to CSS can be made in the docs repo. More significant changes, such as those that may impact the entire website and docs, should be made here.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

napari_sphinx_theme-1.1.1.tar.gz (107.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

napari_sphinx_theme-1.1.1-py3-none-any.whl (32.3 kB view details)

Uploaded Python 3

File details

Details for the file napari_sphinx_theme-1.1.1.tar.gz.

File metadata

  • Download URL: napari_sphinx_theme-1.1.1.tar.gz
  • Upload date:
  • Size: 107.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for napari_sphinx_theme-1.1.1.tar.gz
Algorithm Hash digest
SHA256 74fd47dec099b0bfd60459420d7d5f1c46c83649f4ef86c673507ac04afd008a
MD5 2f7f67847a92fc0ef9f47b56a59a09d6
BLAKE2b-256 4f5e9971ec8d0ce9c9747c23da02b3b884ab291f3dd04a7a4d2e4d8d39bcd49a

See more details on using hashes here.

Provenance

The following attestation bundles were made for napari_sphinx_theme-1.1.1.tar.gz:

Publisher: deploy.yml on napari/napari-sphinx-theme

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file napari_sphinx_theme-1.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for napari_sphinx_theme-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d235308835fd71548e588cd98dba97f1eb9748f44718893edac8eede68183f24
MD5 bd23131a67b91d1faf6b09373b43ada6
BLAKE2b-256 8bd5d63d3b8422bec25d595d1ab43157dedea4fb53712cc6435a24584bc50027

See more details on using hashes here.

Provenance

The following attestation bundles were made for napari_sphinx_theme-1.1.1-py3-none-any.whl:

Publisher: deploy.yml on napari/napari-sphinx-theme

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page