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
.colightfiles
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 blockshide-statements/show-statements- Hide or show Python statements (imports, assignments)hide-visuals/show-visuals- Hide or show results/visualshide-prose/show-prose- Hide or show markdown prose (comments)format-html- Output in HTML formatformat-markdown- Output in Markdown format
Pragma formats
# %% hide-code # Double percent format
# | show-visuals # Pipe format
#| colight: hide-prose # Legacy format (still supported)
Precedence
- Form-level pragmas (highest priority)
- CLI options
- File-level pragmas
- Defaults (lowest priority)
show-* pragmas always override corresponding hide-* pragmas.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file colight_prose-2025.7.7.tar.gz.
File metadata
- Download URL: colight_prose-2025.7.7.tar.gz
- Upload date:
- Size: 150.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
21342238d66479073817c224de8aab6f90b060866c5e2b9cf24cca5313155812
|
|
| MD5 |
707d87f1d190204ce4e352302b8fbf6f
|
|
| BLAKE2b-256 |
605a59f83fdcd8b1259aec919b41ea599f0852dfb93b8dd3f3ed0a8d76714c21
|
File details
Details for the file colight_prose-2025.7.7-py3-none-any.whl.
File metadata
- Download URL: colight_prose-2025.7.7-py3-none-any.whl
- Upload date:
- Size: 67.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4a5303054474338a4c89d5f91f4effef1a4644c05abe4de0b1c608b222b1c925
|
|
| MD5 |
6543fd4c3ce71f13a0ad9eddbc6ca5bf
|
|
| BLAKE2b-256 |
dce3e9401367479de165e36ca2cd96b6f701da24ac46aec2a5d2a249d8c3022e
|