You are not logged in.

#1 2013-02-19 22:09:27

jakobcreutzfeldt
Member
Registered: 2011-05-12
Posts: 1,041

m4-bloggery: another static website generator (only reqs. Make & M4)

Just what we need: yet another static website generator.

I grew frustrated with all the static website generators out there that have heavy dependencies on millions of Python or Ruby libraries. True, there is nanoblogger but I found it to be extremely slow and full of features that I really don't need, since I'm not a heavy blogger. There are probably others too, but I didn't find anything that fit for me. Fortunately, I found m4-bakery, which is a static site generator that uses only Make and m4 (and optionally markdown). I'm pretty sure that project was made only as a proof-of-concept, though, and it lacked some basic functionality that I needed, namely a news/blog index and an Atom XML feed.

So, I forked the project and expanded it a bit to make it more functional. I've now split off a clean repository containing only a skeleton, so it's easy to clone it and get started with your own site.

Pages/posts have a simple format:

TITLE({"page title"})
DATE({"2013-02-19 23:01"})
UPDATE({""})
BODY({"{"
    Here's some text.
"}"})

New news/blog posts can be easily created:

$ make new-post TITLE="A post about nothing"

This would create a file at src/news/2013-02-19-a-post-about-nothing.md.m4.

Once you're done writing, you simply do:

$ make all deploy

This runs all *.md.m4 files through markdown to create *.html.m4 files, then it runs all *.html.m4 files and templates and through m4 to create the final HTML files. These are copied to the folder "dst" and then deployed via rsync.

It's quite self-contained: all the logic is in one hackable Makefile. All other customization is done in the HTML templates and the CSS. The defaults are quite basic, since I hate web design (in fact, the defaults are just what I used for my own website). 

You can find the repository on Gitorious:
https://gitorious.org/bi-websites/m4-bloggery

I hope someone finds it useful!

Last edited by jakobcreutzfeldt (2013-02-19 22:37:18)

Offline

Board footer

Powered by FluxBB