Skip to main content

Static site generator for Colight visualizations

Project description

Colight Site

Static site generator for Colight visualizations.

Converts .py files into markdown/HTML documents where:

  • Comments become narrative markdown
  • Code blocks are executed to generate Colight visualizations
  • Output is embedded as interactive .colight files

Usage

# Build a single file
colight-prose build src/post.py --output build/post.md

# Watch for changes
colight-prose watch src/ --output build/

# Initialize new project
colight-prose init my-blog/

File Format

.py files mix comments (markdown) with executable Python code:

# My Data Visualization
# This creates an interactive plot...

import numpy as np
x = np.linspace(0, 10, 100)

# The sine wave
np.sin(x)  # This expression generates a colight visualization

Pragma Directives

Control the output format and visibility of content using pragma comments:

File-level pragmas

Begin with hide-all-, at the beginning of the file:

# | hide-all-code

# Your content here...

Form-level pragmas

Place directly before a code block:

# | show-code
x = np.array([1, 2, 3])

Available pragmas

  • hide-code / show-code - Hide or show code blocks
  • hide-statements / show-statements - Hide or show Python statements (imports, assignments)
  • hide-visuals / show-visuals - Hide or show results/visuals
  • hide-prose / show-prose - Hide or show markdown prose (comments)
  • format-html - Output in HTML format
  • format-markdown - Output in Markdown format

Pragma formats

# %% hide-code          # Double percent format
# | show-visuals        # Pipe format
#| colight: hide-prose  # Legacy format (still supported)

Precedence

  1. Form-level pragmas (highest priority)
  2. CLI options
  3. File-level pragmas
  4. Defaults (lowest priority)

show-* pragmas always override corresponding hide-* pragmas.

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

colight_prose-2025.7.4.tar.gz (150.8 kB view details)

Uploaded Source

Built Distribution

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

colight_prose-2025.7.4-py3-none-any.whl (67.6 kB view details)

Uploaded Python 3

File details

Details for the file colight_prose-2025.7.4.tar.gz.

File metadata

  • Download URL: colight_prose-2025.7.4.tar.gz
  • Upload date:
  • Size: 150.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.3

File hashes

Hashes for colight_prose-2025.7.4.tar.gz
Algorithm Hash digest
SHA256 463411252073e24d8ef095156cae27b7eb48d44eec57d05487c8f4657b096deb
MD5 f6b06f8d30dd2a469f3b8e1e2aa666d5
BLAKE2b-256 493483eed4d9cae86c4f977081298b21c1f1d7cf605820c13fbc2bd85e1fcbb8

See more details on using hashes here.

File details

Details for the file colight_prose-2025.7.4-py3-none-any.whl.

File metadata

File hashes

Hashes for colight_prose-2025.7.4-py3-none-any.whl
Algorithm Hash digest
SHA256 b952a0fa8e81537cb5ef109023ac1c28c011afe2e738cbf2063f3549cc0f9133
MD5 56e2a3c489d336694c9f0360408a65e1
BLAKE2b-256 c059a68cca635f1cb98c057406dae3ab0fae9b1ea36a124d381efcef8158513e

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