zigcc/zig-cookbook

Build website using zine

Closed this issue · 7 comments

https://zine-ssg.io/

I would like a solution written entirely in Zig, but it seems zine is designed for blogs, not book.

Upstream issue: kristoff-it/zine#138

Related : https://tigerbeetle.com/blog/2025-02-27-why-we-designed-tigerbeetles-docs-from-scratch/ - maybe this could be inspiration for a pure-Zig tool to build the book?

Looks very promising, do you have ideas about injecting code into HTML?

Currently, mdbook support include instruction for this purpose.

you mean like the runnable code snippets in the Rust cookbook? No idea, sorry... They have code fragments in the tigerbeetle docs, but they're all static AFAIK.

you mean like the runnable code snippets in the Rust cookbook?

No, static is fine.

The problem is the code snippets is in a .zig file, they need to be injected into an HTML file.

It's a problem to migrate include(from mdbook) to relevant operator in zine.

Could we write a similar function in Zine?

https://zine-ssg.io/docs/supermd/scripty/#$code

It seems $code is what we need:

[This is the caption]($code.asset('foo.zig'))