Recently I switched from hand-hacking HTML to writing my site’s pages in Markdown and compiling with Pandoc. I’ve looked at a bunch of static site generators, but they were all complicated or had too many bells and whistles for my taste. So, I’ve been writing a few shell scripts to automate the process.
One such script allows me to update a running blog. I was inspired by Luke Smith’s lb, which I used to use. I don’t have it perfect yet; I still want it to generate an RSS feed among other things. However, I’m getting there.
Part of the appeal is the simplicity. I can’t believe there are blog applications out there that require you to use a database! Half the work in my system is done by the file structure itself; posts are in directories of the form
where my script can recurse through, building all the
.md files it sees.
Sometimes I forget how much I’ve learned with this website as a personal project. A year ago, I would have had no clue how to write any of these scripts, much less how to do something like this with basic coreutils rather than some giant clunky Python script or something. It just goes to show how much you can learn, almost by accident, when you just tinker with something you think is interesting.