git.mcksp
brcl - in situ static site generator
git clone https://git.mcksp.com/brcl.git
README
brcl.c

brcl
----

brcl is a static site generator, that relies on you
actually writing html.

There are 4 main features of brcl:
 - replacing header and footer with prepared template,
 - generating index files for given folders,
 - generating rss feed,
 - preparing files for new articles.

It also supports simple variables in templates like:
<!--date:2023/05/15-->

Minimal template for brcl consists of two parts and looks like this:

header:

<!doctype html>
<!--title:%s-->
<!--date:%s-->
<html lang='en'>
    <head>
        <meta charset='UTF-8'>
        <title>%s</title>
        <link type='text/css' rel='stylesheet' href='/style.css'>
    </head>
    <body>
        <header>
            <a id='title' href='/'>mcksp</a></span>
            <div>
                <a href='/blog'>blog</a>
                <a href='/about'>about</a>
                <a href='/rss.xml'>rss</a>
            </div>
            <h1>%s</h1>
            <span id='date'>%s</span>
        </header>

and footer:

        <footer>
            have a nice day!
        </footer>
    </body>
</html>

And now promise of the brcl is that everything between
those template parts will be untouched by it,
and anytime template will change, it will swap it
for any existing article.

If you want to create new article you can
copy existing one and change title and date values,
or you can call:

brcl [dir] [filename] [title...]
brcl blog tart My recipe for lemon tart

That will create a new file in blog/tart.html
with the title "My recipe for lemon tart" and current date.

I created that mostly because I was tired of setting up
Jekyll environment from zero every two years that I remind
myself that I own a blog webpage.