Benad's Web Site

I can't remember where I found out about Hugo, the static web site generator tool. All that I can remember is that, after stumbling on it, it introduced me to the idea that my own blog could be statically generated into HTML. I was still using Squarespace, so I quickly exported all my posts and found a way to make them part of my Hugo template.

Compared to using Squarespace, there were two annoyances with using Hugo. First, I lost the ability to generate and publish any new blog post without having at least the Hugo software installed on a computer. With Squarespace (and for the short amount of time I used Wordpress) all you needed to post from your phone is their app, or you could use their web interface. Second, Hugo doesn't support my strange setup of using XML and XSLT to generate the HTML pages for my "base" web site (meaning, anything outside of /blog).

I discovered 11ty ("Eleventy") from its use by tweetback. I used it to generate a static archive of my now-inactive Twitter account. What impressed me is that not only it supports many templating languages, but you can use plain JavaScript to either generate the sources or to create your own custom templating language. In my case, this would make it possible to use my custom XSLT templating in it.

Because 11ty is in JavaScript for NodeJS, the GitHub pipeline's own Oryx builder can detect it and run npm run build automatically each time I push a change to my GitHub repository github.com/benad/azbenadmestatic. This means that the GitHub Action will generate my web site and publish it automatically. Combined with vscode.dev or with GitHub Codespaces, all I need is a web browser to create a new blog post, commit + push it to GitHub, and see my changes on benad.me.

It took some effort to migrate everything to 11ty, but thanks to 11ty's flexibility the newly generated pages are nearly identical to the previous version of this site. It also requires only NodeJS (instead of my combination of BASH scripts, Java code and Hugo), so it's easy to build from any computer.

Published on June 11, 2023 at 14:24 EDT

Older post: The Static Web Site Server

Newer post: Teletext, or The Ghost Between the Frames