1 Getting Started
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 — nREPL client (install via bbin, which provides the
clj-nrepl-evalcommand):
bbin install io.github.bhauman/clojure-mcp-lightVerify everything is available:
quarto --version
jank --version
bb --version
clj-nrepl-eval --helpOptional: 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-doc1.3 Install the extension
Run this inside your project directory — it creates an _extensions/ folder there:
quarto add scicloj/janqua1.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.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 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 doneStop 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-pagesThis 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
- Learn about Kindly annotations to render HTML, SVG, charts, and tables
- See the Live Demo for evaluated examples