Skip to content

core-diagrams — diagrams as you write them

core-diagrams is core-slim with diagram rendering already wired in. You write a mermaid fence and it becomes a figure — no engine change, no build step of your own.

Get it from the core-diagrams template repository via Use this template, then follow the Quickstart. Diagrams covers what you can write.

What you get

Everything core-slim has, plus the wiring for diagrams. Its compose file carries a second container — the renderer, wired as a hook. Its project.conf carries a house style for how diagrams are drawn.

Your manuscript is unchanged by any of it, and a book with no diagrams in it comes out exactly as it would under core-slim — at the cost below.

Commands

The same set as core-slim, with one difference:

make verify               # verify both signed images — the engine and the renderer

The renderer is a second program your manuscript reaches, so it is signed and verifiable like the engine — verify checks it against the identity of whoever published it. Available hooks names its source, if you want to read it or improve it.

The first build pulls both images; later builds reuse them. The renderer's healthcheck uses start_interval, so this template needs Docker Engine 25 or newer.

When a newer Keystone release lands, see Upgrading your project, or hand the AI-assisted procedure to an assistant.

What it costs

A second container, holding a browser — around 260 MB of memory, resident from your first build until you stop it. That is per project, so several open at once add up.

Staying up saves the next build a second or so on a fast machine. The cache saves far more, and a stop leaves it alone, so KEYSTONE_HOOKS_KEEP_ALIVE=false costs that second and nothing else. make ps shows whether the renderer is up, make down stops it, and make reset is what drops the cache.

It takes no network — like the engine, it runs with network_mode: none — but it is still a second program your manuscript reaches. What that means for a hermetic build is set out in Sandboxing.

When to switch

To read or change the engine, use core, which ships the whole runtime in your project. You do not give up diagrams by switching: the renderer is an ordinary hook, and Wiring a published hook puts it in any template. For a book with no diagrams, core-slim is the everyday template.