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

  1. Quarto — the publishing system
  2. Jank — the Jank compiler and REPL
  3. Babashka — fast Clojure scripting runtime
  4. bbin — tool installer for Babashka
  5. clj-nrepl-eval — an nREPL client. It’s provided by clojure-mcp-light (the bbin wrapper exposes it as the clj-nrepl-eval command):
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 --help

1.2 Create a project

mkdir my-jank-doc
cd my-jank-doc

1.3 Install the extension

Run this inside your project directory — it creates an _extensions/ folder there:

quarto add scicloj/janqua

Sanity 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.qmd

This 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.qmd

This 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