Oddbean new post about | logout
 @Nekobit im thinking of writing a templated DSL for writing HTML directly in C++ and basically reinventing Go’s html/template for {{stuff}} in my template files. i know basically nothing about CGI so im using boost::beast for serving my generated html i guess its super overkill in general but i really have nothing better to do:pleaddeath:

heres a parser for the file config i wrote yesterday, it works like this:

a: b
c: d
---
{{contents}}


becomes

conf["a"] = "b"
conf["c"] = "d"


https://media.clubcyberia.co/pleroma/acb2bfd83545b5153ba9f0a88a7fb134ed1912f11457965266ca158a6ef3d168.png