7 Contributing
Notes for people working on Babqua itself. If you’re here to use Babqua, start with Getting Started instead.
7.1 Repo layout
_extensions/bb/— source of truth for the published extension. The Lua filter (babqua.lua), bb-side runtime (runtime.bb), the preview-mode lifecycle script (babqua-lifecycle.bb) and its companion nREPL client (babqua-nrepl-client.bb, invoked per render when persistent mode is active), stylesheet (babqua.css), and the Quarto metadata (_extension.yml) all live here.docs/— this Quarto book. Each chapter is a.qmdfile; the filter renders the live{.clojure .bb}blocks against the in-tree extension.docs/_extensions/bb/— symlink shim pointing back to_extensions/bb/. Quarto requires an_extensions/directory adjacent to the_quarto.ymlit’s rendering, so the docs book needs its own copy of the extension. The symlinks let the docs pick up changes to the in-tree extension immediately, without going throughquarto add. If you add a new file to_extensions/bb/, mirror it as a symlink indocs/_extensions/bb/.
The published install path is _extensions/scicloj/bb/ (created by quarto add scicloj/babqua); the in-tree _extensions/bb/ is what this repo ships. The docs book uses the symlink shim above to render against the in-tree copy, matching Janqua’s setup.
For an end-to-end walk through a single render — what each pass does, how the bb runtime is invoked, how chart payloads reach the browser — see How It Works.
7.2 Local setup
git clone https://github.com/scicloj/babqua
cd babqua/docs
quarto renderThe symlinks are committed, so there’s no setup script. A clean render produces docs/_book/ with one HTML file per chapter.
For live iteration as you edit:
cd docs && quarto previewQuarto serves the book at a local URL and re-renders each chapter you save. For chapters with heavy bb.edn deps or pods, the optional persistent bb session described in Workflow keeps state warm across saves.
Or render a single chapter directly for the fastest one-shot feedback:
cd docs && quarto render demo.qmddemo.qmd exercises every Kindly kind plus stdout, errors, and a live HTTP fetch in a single file.
7.3 Releases
Tags are cut from main. The version-bump goes in its own commit, separate from any pre-release fixes.