Static site generator in J.
J is an array programming language where transformations apply to entire structures at once. Static site generation is fundamentally data transformation: content files become HTML pages. J treats this as a natural array operation.
Pipelines build from verbs without naming intermediate values:
render =: emit @ template @ parse @ readContent flows right-to-left through composed functions. No variables, no state—just transformation.
Operations automatically extend across array dimensions:
NB. render works on one file or a thousand
render 'post.md'
render postsThe same verb handles a single page or an entire site. Rank determines how deeply the operation penetrates.
J programs are measured in characters, not lines:
toc =: ('#'&=@{. # ])&.>A complete table-of-contents extractor in 23 characters. Every glyph carries meaning.
| Property | Mechanism |
|---|---|
Deterministic output |
Pure functional transforms |
Parallel rendering |
Implicit array operations |
Memory efficiency |
In-place mutation where safe |
No runtime surprises |
Total functions on boxed arrays |
┌─────────┐ ┌─────────┐ ┌──────────┐ ┌────────┐
│ content │───▶│ parse │───▶│ template │───▶│ emit │
│ files │ │ (;:) │ │ (@.) │ │ (1!:) │
└─────────┘ └─────────┘ └──────────┘ └────────┘
│ │ │ │
└──────────────┴──────────────┴──────────────┘
rank polymorphic
Each stage is a verb. The pipeline is their composition. J’s rank operator controls iteration depth automatically.
-
Incremental builds via file modification time filtering
-
Parallel page generation through implicit array operations
-
Hot reload with filesystem watching
-
Markdown and AsciiDoc content parsing
-
Template composition using gerunds and agenda
Jura SSG participates in the poly-ssg-mcp ecosystem, providing MCP tools for Claude integration:
-
jura_init— scaffold a new site -
jura_build— generate static output -
jura_serve— local development server -
jura_watch— incremental rebuilds
The ReScript adapter bridges J execution to the MCP protocol.
Requires J 9.4+ from Jsoftware.
# Clone and install addons
git clone https://github.com/hyperpolymath/jura-ssg
cd jura-ssg
jconsole -js "install'web/jura'"