No description
  • C 99.7%
  • HTML 0.3%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-08-26 10:50:26 +03:00
example slight change to printing out metadata 2026-08-26 10:50:26 +03:00
src slight change to printing out metadata 2026-08-26 10:50:26 +03:00
.gitignore Initial commit after a few hours of turbocoding 2026-08-24 10:53:13 +03:00
config.h Fix forgotten test path 2026-08-25 00:43:58 +03:00
LICENSE License 2026-08-24 10:56:17 +03:00
nob.c Slight readjustments and readme updates 2026-08-25 05:18:25 +03:00
nob.h Initial commit after a few hours of turbocoding 2026-08-24 10:53:13 +03:00
README.md ordered lists, unordered lists, metadata blocks 2026-08-26 10:06:00 +03:00

zettp-kani

Kani is a static site generator, written in C

Good:

  • Fast
  • <1mb executable
  • Written in c

Bad:

  • Written in c

Requirements

  • Linux system
  • c compiler with gnu23 support ( gcc >= 14.2 )

If you prefer musl over glibc, in nob.c, uncomment the line from the top.

Why not c99 like every reasonable person would use?
Because we are not in 1999 anymore.

Note

No testing done for Windows or Mac

Supported markdown features

Supported:

  • Headers
  • Paragraphs
  • Metadata block including "Top image" for a "post"
  • Unordered lists (-ul blocks)
  • Ordered lists (-ol blocks)

TODO:

  • Images

Usage

[1] To use Kani, first you need to configure it using config.h Give it the list of .md files you want to convert and also the output path.

[2] Bootstapping build system. in the root folder:

gcc -static nob.c -o nob
./nob

[3] Running Kani

./build/kani

By default, Kani doesnt overwrite files, if you want to trigger re generation of all .html files, use -f or --force flag:

./build/kani -f

The generated .html files are inside the public_folder you defined in config.h

Credits

nob.h: https://github.com/tsoding/nob.h
stb_ds.h: https://github.com/nothings/stb