1 Getting Started
Janqua is currently tested only on Linux. macOS hasn’t been verified — if you try it, please open an issue with what you find.
1.1 Prerequisites
- Quarto — the publishing system
- Jank — the Jank compiler and REPL
- Babashka — fast Clojure scripting runtime
- bbin — tool installer for Babashka
- clj-nrepl-eval — an nREPL client. It’s provided by clojure-mcp-light (the bbin wrapper exposes it as the
clj-nrepl-evalcommand):
bbin install https://github.com/bhauman/clojure-mcp-light.git --tag v0.2.1 --as clj-nrepl-eval --main-opts '["-m" "clojure-mcp-light.nrepl-eval"]'Verify everything is available:
quarto --version
jank --version
bb --version
clj-nrepl-eval --help1.2 Create a project
mkdir my-jank-doc
cd my-jank-doc1.3 Install the extension
Run this inside your project directory — it creates an _extensions/ folder there:
quarto add scicloj/janquaSanity check that the filter files landed:
ls _extensions/scicloj/jank/You should see jank.lua, jank-lifecycle.sh, jank.css, and _extension.yml.
1.4 Write a document
Create a file called hello.qmd:
---
title: "Hello Jank"
filters:
- jank
---
```{.clojure .jank}
(+ 1 2 3)
```
```{.clojure .jank}
^:kind/hiccup
[:div {:style "color: coral; font-size: 24px;"} "Hello from Jank!"]
```Note the {.clojure .jank} syntax: .clojure enables syntax highlighting (in editors and rendered output), and .jank tells the Janqua filter to evaluate the block. Both use dot prefixes — that’s Pandoc class syntax.
The filters: [jank] in the frontmatter (the YAML header at the top of the file, between the --- markers) tells Quarto to use the Janqua filter.
1.5 Render it
quarto render hello.qmdThis starts a Jank nREPL server (if one isn’t already running), evaluates the code blocks, and produces hello.html.
For a live-reloading workflow, use quarto preview instead — it re-renders automatically each time you save:
quarto preview hello.qmdThis opens a browser with live preview. Edit your .qmd, save, and the page refreshes with updated results. Press Ctrl-C to stop.
1.6 Next steps
- See Workflow for managing the Jank process, auto-start tuning, and publishing to GitHub Pages
- See Kindly kinds for controlling how each result renders (HTML, charts, diagrams, math, …)
- See Authoring Jank documents for code-block attributes and per-block options
- See the Demo for evaluated examples
- For a real-world Janqua-rendered document, see the first Jank post on Clojure Civitas