Re: [dev] mkws(1) - simple static site generator

From: Thomas Oltmann <>
Date: Tue, 1 Sep 2020 10:49:11 +0200

Hi Adrian!

I don't have a lot of time right now, so here's a list of my thoughts
in no particular order:

- I like the general idea. The more I think about it, shell script is
sort of a natural fit for templating.
However, you should put a disclaimer somewhere warning people to not let
user-generated content (like comments) anywhere near mkws;
That sounds like a disaster waiting to happen.

- Your code is great. It's very concise and only does what it needs to do.
pp(1) needs some more comments though, in my opinion.

- You say it depends on OpenBSD's stat. What nonstandard features does
it have that you depend on?
Could this be a problem when using mkws on a different platform?

- This isn't really a fully fledged static site generator. It's a
templating engine.
You can look at werc/swerc for an overview of other functionalities
that SSGs may want to include.
(I'm not saying you should try to blindly emulate other solutions,
just that you should be aware of their feature sets.)

Take navigation menus as an example. It is my understanding that werc
offers a pre-baked solution for this.
In mkws, if I needed a navigation bar on my pages, what I might do is
I could write a script that scans
through my source folder and outputs a list of links in HTML markup,
which I then call at the start of each .upphtml file.

Notice that this script wouldn't be specific to my site --
So I think it would be a good idea if this and a couple other
pre-baked scripts/programs would be directly included in mkws.
Just dump them all in a folder somewhere in /usr(/local)/share or so
and let mkws add that path to the PATH before
running pp.
(And if someone dislikes these scripts, it is trivial for them to ignore them -
they don't increase the complexity of the rest of the SSG.)


Am Di., 1. Sept. 2020 um 04:54 Uhr schrieb Adrian Grigore
> Hi all,
> Can you give me a review for this
> --
> Thank you,
> Adi,
> Freelance Developer
Received on Tue Sep 01 2020 - 10:49:11 CEST

This archive was generated by hypermail 2.3.0 : Tue Sep 01 2020 - 12:00:08 CEST