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.1.tar.gz (22.0 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.1-py3-none-any.whl (26.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for neon_synth-1.0.1.tar.gz
Algorithm Hash digest
SHA256 df4fd8137afc162ee1b32d126f278f732691a3284754b5e1c7cf22248edcbfdf
MD5 81ff71804cccf3141f749c33a59cb985
BLAKE2b-256 3ff8cd139314efa4486e9d64ab903d3a9f9aa56997e92d6864c7cf1c4d1153d3

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for neon_synth-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5a2dc35477bdcdba91caf33f549f7bdc7c71afde7b77f769569d294f2f88d0db
MD5 e693ce14eacbaf91bd95147a988cb7bb
BLAKE2b-256 d0d5fb7dc01e9608d9d5f0b5a4814ab91e1a5936cc5baae7443bb9f438433564

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