A Dip into Static Site Generation with Metalsmith (GHD069)

I’m getting the feeling that this month’s various goal-oriented tasks will make for incredibly dull reading. For example, today I spent about 90 minutes going through a tutorial for Metalsmith.

Metalsmith is an example of a “static site generator”, a program that you can use to assemble complicated websites from scraps of text and templates into plain HTML files (the “static” site) and simply uploaded. This is in contrast to a “dynamic website” based on a content management system like WordPress; in that kind of system, you install a program on the web server that generates each web page as it is requested. The cool thing about dynamic systems is that you can change the program in one place and affect the way every webpage looks nearly instantaneously, whereas in a static system you would have to regenerate all the pages and reupload. Back in 2004, this was quite expensive and difficult to do with the software available at the time. In 2016, though, the situation has reversed with much better tools and high-speed internet connections. I’m ready to make the switch! However, it’s going to take quite a long time to figure out how I’m going to do that.

So, for Monday I started by just trying out the site generator I’ve chose, the aforementioned Metalsmith. I did the following:

  • Read a couple of tutorials
  • Made a new directory with the right files
  • Figured out how to install Metalsmith
  • Figured out how to make a simple Metalsmith build script and run it, copying files from one directory into another directory after transforming them
  • Created a new private Git repo and saved my progress

This took about 90 minutes, which seems like a loooooong time to do so little. But I have to remind myself that doing all this in 90 minutes would have taken a lot longer 10 years ago. Installing Metalsmith alone would have probably taken the better part of a day because Homebrew, Github, Node, and NPM didn’t exist then. And Metalsmith itself probably could not have existed because it is built, as many many interesting software packages are these days, on top of an entire ecosystem of shared open source code. Back then, we had Movable Type as the champion for static site generation (it predates WordPress and was relatively popular).

Anyway…progress made!

Things Learned and Points Earned

Using my updated Groundhog Day Resolutions Tracker‘s point system, here’s what I scored:

PTS DESCRIPTION
50 Financial Reports…reviewed taxes for the year!
10 Daily Post!
10 Shared stuff I know! Streamed my Metalsmith session.
5 Eliminated some options!
3 I tried out the Metalsmith tutorials
3 I overcame resistance to do some Metalsmith stuff.
2 I reduced scope so I could start something!
1 Researched various sundry things to make game stuff possible!

That 84 points, thanks to the taxes BIG 50 POINT addition!



About this Article Series

For my 2016 Groundhog Day Resolutions, I'm challenging myself to make something goal-related every day from February 2nd through December 12. All the related posts (and more!) are gathered on the Challenge Page.