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.3.tar.gz (107.2 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.3-py3-none-any.whl (32.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: napari_sphinx_theme-1.1.3.tar.gz
  • Upload date:
  • Size: 107.2 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.3.tar.gz
Algorithm Hash digest
SHA256 d4ff01e65c2f604ac86700aabaa10b5ff5ad9eb727ef756f47c355dbe6979336
MD5 e091dd44300b5e302f0bea8252495f28
BLAKE2b-256 3c7d9588cc7360b4af9d2878107a0580604945e867842ec6d7431976f110050d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for napari_sphinx_theme-1.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 121a161730859b3122f70217da9aace9b463583f31b28909cb29f04f49977785
MD5 521b9e58ac6e3b3df515b294b039b129
BLAKE2b-256 ff56bcd94bab716d4843866ec4411331e0665b8d97253be61282ba5a3272dfa5

See more details on using hashes here.

Provenance

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