back to home
blag: blogging in bash
..or fullstack web app development in bash using bingus-blog. either works
blag: blogging in bash
have you ever wanted to write blog posts in bash? well, now you can, with blag and bingus-blog.
what
it all started in a conversation i was having with lily about blog engines.

it is important to note that this project ended up being ssr, not ssg. i just find ssr to be far more comfortable and extensible (more on that later).
a few days later, i got to work, and shared a screenshot of the first functioning draft in a fedi post.

in classic slonk fashion i started overengineering it soon after.
not before long, bingus-blog had a refactor abstracting away the post
provider in a trait object, improving caching, and more. overall, one
could argue that the blag engine mode is actually more robust than
markdown…
i want to see it in action
sure! a bingus-blog instance configured with the blag engine and some
funky blag-posts is live over at blag.slonk.ing!
just please don't hack me. or do. your choice. if you do though, please tell me
so i can fix it😅
security
now for the obvious question, is this secure?
easy answer: no. i do not consider this secure enough to host on actual hardware, even i use a dedicated vm to host bingus-blag
however, it should be secure enough unless you do something wrong, allowing for rce or something. and it's really easy to do something wrong with this.
presently only one code execution vulnerability was found, which involved providing an url encoded path as the post name in the url, and led to an attacker being able to source local shell scripts. this has been fixed, but still, please don't host this on your production servers.
how to blag
to get started, you must first obtain the blag command:
git clone https://git.slonk.ing/slonk/blag
sudo install -Dt /usr/local/bin blag/blag # install blag in the global PATH
# if you don't want to do this, you can install it anywhere where bingus-blog
# can reach, but if it's not in it's PATH, you must set `blag.bin` to the path
# to the blag executable in the config
after that, it's a matter of simply deploying bingus-blog as usual,
but with engine.mode = "blag" in the config
further instructions are available in blag's README file