Skip to main content

Neon Synth Sphinx theme with dark/light/system modes

Project description

Neon Synth

A neon-synth Sphinx theme with neon styling and dark/light/system modes.

Install

pip install neon-synth

Or in requirements.txt:

neon-synth==1.0.0

For local development:

pip install -e /path/to/neon-synth

Standalone Sphinx usage

# conf.py
import os

project = "My Docs"

html_theme = "neon-synth"

html_theme_options = {
    "light_logo": "logo-light.svg",
    "dark_logo": "logo-dark.svg",
    "sidebar_hide_name": False,
    "navigation_with_keys": True,
    "default_theme": "system",
    "show_toc_level": 2,
}

def _env_flag(name, default="off"):
    return os.getenv(name, default).lower() not in ("0", "off", "false", "no")

html_context = {
    "neonbook_vhs": "on" if _env_flag("NEONBOOK_VHS", "on") else "off",
    "neonbook_perf_log": "on" if _env_flag("NEONBOOK_PERF_LOG", "off") else "off",
    "neonbook_perf_sound": "on" if _env_flag("NEONBOOK_PERF_SOUND", "off") else "off",
    "neonbook_perf_notify": "on" if _env_flag("NEONBOOK_PERF_NOTIFY", "off") else "off",
}

Theme options

  • light_logo: logo for light mode
  • dark_logo: logo for dark mode
  • sidebar_hide_name: hide project name in the sidebar
  • navigation_with_keys: enable keyboard navigation
  • default_theme: "dark", "light", or "system"
  • show_toc_level: depth of headings shown in the sidebar

Logo files are expected under _static/ (for example, _static/logo-light.svg).

Environment variables

These are optional. The theme reads them from html_context, so you can either set the keys directly or wire them from environment variables in conf.py.

  • NEONBOOK_VHS: toggle VHS effects (default: on)
  • NEONBOOK_PERF_LOG: enable performance console logging (default: off)
  • NEONBOOK_PERF_SOUND: play a siren on heavy load (default: off)
  • NEONBOOK_PERF_NOTIFY: desktop notification on heavy load (default: off)

For boolean flags, any value other than 0, off, false, or no is treated as on.

License

Apache License 2.0. See LICENSE.

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

neon_synth-1.0.0.tar.gz (21.9 kB view details)

Uploaded Source

Built Distribution

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

neon_synth-1.0.0-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file neon_synth-1.0.0.tar.gz.

File metadata

  • Download URL: neon_synth-1.0.0.tar.gz
  • Upload date:
  • Size: 21.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for neon_synth-1.0.0.tar.gz
Algorithm Hash digest
SHA256 3853514636a79d87e80774199b6ea819f35f0557b4883d7f7bb1f92e64250e5b
MD5 68d2427ac98d98f54a015aaf27dd53d8
BLAKE2b-256 8b995f5bfd643ca87156611b0fc31f69a1944f7c95c96e8dbb11f8c9e8247fea

See more details on using hashes here.

File details

Details for the file neon_synth-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: neon_synth-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 6.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for neon_synth-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 69937481e3c1b6872a755f4e9122af64b5c57b7632e141a4001b2caf0a23240a
MD5 e331fab8d94fc8251620cd655c4878db
BLAKE2b-256 cfe22bda1d46278ba83ff045fee7f1dbdc7460fed48b62a0ad4a89c536e66014

See more details on using hashes here.

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