1  Getting Started

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-evalnREPL client (install via bbin, which provides the clj-nrepl-eval command):
bbin install io.github.bhauman/clojure-mcp-light

Verify everything is available:

quarto --version
jank --version
bb --version
clj-nrepl-eval --help

Optional: Graphviz is needed for ^:kind/graphviz diagrams (dot must be on your PATH).

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

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 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 Managing the Jank process

The Jank nREPL server starts on the first render and stays running for fast re-evaluation. You can manage it with the lifecycle script:

_extensions/jank/jank-lifecycle.sh status   # check if running
_extensions/jank/jank-lifecycle.sh start    # start manually
_extensions/jank/jank-lifecycle.sh stop     # stop when done

Stop the server when you’re done working to free resources.

1.7 Publishing to GitHub Pages

If your project is a Quarto book or website, you can publish it to GitHub Pages directly from your project directory:

quarto publish gh-pages

This renders the project and pushes the output to the gh-pages branch. GitHub Pages then serves it as a website. On first use, Quarto will create the branch and configure it for you.

See the Quarto publishing guide for more options, including custom domains and GitHub Actions automation.

1.8 Next steps