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.0.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.0-py3-none-any.whl (32.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for napari_sphinx_theme-1.1.0.tar.gz
Algorithm Hash digest
SHA256 3be953803a82ee01ff8045d647eea45c9030c69b3363ed9908f6390a54874c54
MD5 25000e39656b7e7fe66221cd8e46e2bf
BLAKE2b-256 b8750c20713b40ac5f6cbc1c9bf7d4d1b5094df292c24ac152e5795023fdfe75

See more details on using hashes here.

Provenance

The following attestation bundles were made for napari_sphinx_theme-1.1.0.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.0-py3-none-any.whl.

File metadata

File hashes

Hashes for napari_sphinx_theme-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 159f860a6d21cfc5d289dc77f1c31a4bc15a0826407352e6424559142a981fc1
MD5 2d533fdc84bad2201f2bd8d662d7ca9a
BLAKE2b-256 6177d2d3973cc7dcd2866389ebc81e308324716a23751fb317d23b7278f98847

See more details on using hashes here.

Provenance

The following attestation bundles were made for napari_sphinx_theme-1.1.0-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