Janqua
Jank code in Quarto documents
Overview
Janqua is a Quarto extension for evaluating Jank code blocks in documents.
Write Jank code in .qmd files and get live results — code output, inline SVG, Plotly.js charts, markdown tables, and more. Use it for publishing documents or for interactive data exploration with quarto preview, which re-renders on every save. Uses the Kindly convention for rendering, compatible with the Clojure ecosystem.
Janqua is at an experimental stage. Things may change, and some rough edges are expected. Feedback, bug reports, and ideas are very welcome — please open an issue on GitHub or reach out on the Clojurians Zulip chat.
What is Quarto?
Quarto is an open-source publishing system for technical documents. You write .qmd (Quarto Markdown) files mixing prose and code, and Quarto renders them to HTML, PDF, slides, and other formats.
Quarto supports several project types:
What is Jank?
Jank is a Clojure dialect that compiles to native code via C++. It aims for full Clojure compatibility with the performance of a native runtime. Jank includes an nREPL server, which Janqua uses to evaluate code interactively during document rendering.
Clojure ecosystem connection
Clay is a Clojure tool for data visualization and literate programming. Clay generates Quarto markdown from Clojure namespaces, then uses Quarto as a rendering engine to produce HTML pages, books, and slideshows. Clojure Civitas, the community blog, is built this way. Civitas can also render .qmd files directly (not just Clay-generated ones), so Janqua documents are expected to work well with it.
Janqua brings a similar experience to Jank: you write Jank code directly in .qmd files, and the Quarto filter evaluates it during rendering. Both Janqua and Clay use the Kindly convention for rendering annotations, so code patterns are transferable between the two ecosystems.
How it works
- You write a
.qmdfile with{.clojure .jank}code blocks - When Quarto renders the document, the Janqua filter intercepts these blocks
- Each block is sent to a Jank nREPL server for evaluation
- Results are inserted into the document — as code output, HTML, charts, diagrams, or markdown — based on Kindly annotations
^:kind/hiccup
[:div {:style "color: coral; font-size: 24px;"}
"Hello from Jank!"]The Jank process starts automatically on first render and stays running for fast re-evaluation. See Getting Started to try it out, or jump to the Live Demo to see evaluated examples.
Future goals
- Clojure Civitas integration — enabling community members to publish Jank posts on the blog
- Broader Kindly support — more visualization kinds (tables, images, etc.)
- Easier setup — reducing the number of prerequisites and simplifying installation
- Clay support for Jank — a namespace-as-a-notebook experience, where Jank source files render as documents without writing
.qmdby hand - Jupyter support — a Jank kernel for Jupyter notebooks, enabling interactive Jank development in JupyterLab and other Jupyter-compatible environments
Chapters
- Getting Started — prerequisites, installation, first document, rendering
- Kindly Annotations — controlling output format with metadata
- How It Works — architecture, port discovery, process management, evaluation pipeline
- Live Demo — evaluated examples of all output kinds