New Blog!

Welcome to my new blog! I've had a blog on blogger since April 4, 2007. That's almost 11 years! That's a long time! After all that time, I thought I was due for a change, and I thought it would be fun to build that change myself. Turns out it was fun! I learned a lot of stuff that I probably should have already known but didn't. So let's get meta and blog about the development of this blog!

I had three major questions to answer about how to build a new blog:

  1. How to host it?
  2. How to "code" it?
  3. What should it look like?

How To Host It

I didn't want to spend a lot of money, in fact, I didn't want to spend any money at all. So the obvious choice, but not the one I ultimately went with, was github pages.

Some of the other options, all non-free, I looked at included:

  • NearlyFreeSpeech.Net - cheap basic web hosting
  • Azure Websites - I'm a "Microsoft developer" but I've never used Azure, thought it might be fun. But it ain't cheap, so I didn't go this route.
  • Azure Blob Storage - Azure's version of S3 I guess? Its cheap and it supports custom domains, but not really. You can point a custom domain at it, but you can't set up a default document or eliminate the folder portion of the URL. So you can't get a simple URL like kevinberridge.com to work. So, a non-starter for this.
  • AWS S3 - Cheap, really does support custom domains it looks like. Probably a great solution, but I didn't try it out.

I had everything setup and working with GitHub pages, but dealing with its requirements for where your static files have to be was super inconvenient. With "User pages" all the content files must be in the root of your repo on the master branch, full stop. So, where do you put your actual source files then? I wasn't comfortable putting them on the master branch in subfolders, just cause I don't know if they'd be accessible or not. So I tried to put them on a separate unrelated "blog" branch. But when you build how do you move the output from the "blog" branch over to the "master" branch? Can you build and then do git checkout master? Or will that wipe out the output directory? I saw someone doing something interesting but also scary with the git subtree command, but ain't nobody got time for that. So I tried to do a quick simple hack to:

  1. mv .\output ..\output # move output outside the repo
  2. git checkout master
  3. robocopy ..\output . /MIR # DO NOT DO THIS

Number 3 there makes the working directory exactly match the output directory ("mirrors" it), including removing files. Oh, hey, that means it will remove the .git folder and you'll lose all your history. Oh, and you're on the master branch now which doesn't have your source files so ALL YOUR SOURCE IS GONE. But, oh man lucky me, I did commit the source on the master branch before I started messing with ghpages so PHEW that was close.

"Project pages" can find the output in a "docs" folder instead of right in the root. For some reason, this isn't an option with "User pages". The name of that folder, "docs", can't be configured. Weird, but no big deal. But setup this way the generated output files must be checked in alongside the source files. This makes diffing commits annoying, cause all the noise of the output files is there. Also, it turns out, everytime you build the RSS and Atom feed gets updated, so that's more noise. I got tired of this real fast.

So what did I actually end up using? A friend of mine told me about Firebase. He said, "go home and try it out, you'll be done in 10 minutes." He was dead right. Firebase checked every box on my list:

Using Firebase Hosting, you can deploy SSL-enabled web apps to your own domain on a global content-delivery network (CDN) from a single command."

And it's free (up to 1 GB of storage and 10 GB/month of transfer)!

You may have noticed most of these hosting options are simple content hosts, not full web servers, which leads to...

How To Code It

I knew I wanted to use a static content generator right off the bat. This is a blog, there is no dynamic content here, and I'll write a new page, what? once a week at the absolute most? So static generator it is!

But oh my gosh there are a lot of options for static content generators! Of course, you've got the biggest most famous of them, Ruby's Jekyll. I've used it before, it's easy, there are lots of templates, everyone uses it. Obvious win. But I don't use Ruby anymore, and honestly, I just didn't want to install it.

A relative newcomer (at least to me) that seems to be getting a fair amount of attention these days is Hugo, written in Go. It looks nice and there's a ton of themes, and it's supposed to be really fast. Sounds great. I'm not using it.

Another from the Node.js world was Ghost. It got lots of attention, good and bad. I have a love/hate relationship with node though. But this seems super popular, and they've built a whole business around the thing. Neato.

But I decided to use Wyam. I don't know anyone who uses it, I don't even know of anyone who uses it. It only has 5 themes. But it's written in C#, and you can write your own themes with Razor templates, and it was very easy to get started with. I haven't dug into its source a ton yet, but what I have looked at seemed nice. Though the API you use in the templates themselves is kinda weird, I haven't totally wrapped my head around it. And the big sell is all about how composable it is, but I haven't touched any of that or seen good examples. Whatever, I like it.

What Should It Look Like?

It should look like this!

I decided I wanted to do two rather contradictory things:

  1. I wanted to design and style it from scratch myself
  2. I didn't want to put much time or effort into designing or styling it

Fortunately for me, I knew I wanted it to be simple. Sparse even. You might even say "plain" if you were my wife. Whatever, I like it.

I used purecss and that's it. I like pure's grid system, and I like it's responsive grids too. I played with fonts. I like grey. I picked one color: red. I think it should win a design award.