Static site generator
28 Dec 2024My new program
I have made a new static site generator in ~100 lines of Bash. It allows me to easily place code snippets by simply typing
{include xyz.html}into the HTML document. Then I run the script, and it changes that line by inserting the code of a snippet that is in
/components/xyz.htmlin the place of the 'include' tag.
Why not just use an existing generator?
I wanted to make my own generator, because I find existing ones to be overcomplicated. I couldn't learn how to use moustache.js, and I didn't want to create my own theme for something more complicated like Hugo or Jekyll. At first, I have made a script in JS that could include snippets in place of placeholder DIVs, but, of course, it didn't work when you had JavaScript disabled.
My generator does not have, and will probably never have any prebuilt components, themes or templates. That's because I have made it for people who can make a simple website in HTML, but want a tool to manage it while keeping it static (for example, me). If you are one of them, it is also made for you.
Will I publish it?
I don't know. Maybe, when I test it for another few days, it will be ready. When it will be ready, I will publish the code.