Let's start blogging!

So guys, guess what? I’m finally getting the hang of this newfangled information superhighway, so I figured it was time to join the ’90s and start a web-log!

For real though, it’s time I started keeping a record of the work I do and what I learn from it. Enter: blogomaticus.

It’s 2013 and I’m a computerer, so that means I blog on github, duh. I’m still getting the hang of this Jekyll business, but here’s what I’ve learned so far.

You want to run Jekyll locally so you can preview changes before you push things to github. Especially starting out, there’s so much more than just writing English paragraphs that has to go on to get set up, you don’t want to wait for a round trip to github between every tweak (plus how embarrassing is it to push a bunch of “trying this” “oops, that didn’t work” commits publicly).

On Ubuntu, at least in Precise but I assume it’s still true for this year’s releases, make sure you install the ruby-dev package before trying to install Jekyll. If you don’t, you get errors:

$ sudo gem install jekyll
Fetching: liquid-2.5.3.gem (100%)
Fetching: fast-stemmer-1.0.2.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing jekyll:
	ERROR: Failed to build gem native extension.

        /usr/bin/ruby1.9.1 extconf.rb
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- mkmf (LoadError)
	from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
	from extconf.rb:1:in `<main>'

Maybe this is common knowledge about gems, but it surprised me. Here’s the full, error-free procedure:

sudo apt-get install ruby ruby-dev
sudo gem install jekyll

From there, the blogging world is your oyster. The Jekyll docs are your friend.

Also, since we’re using github, read up on github pages. The short version is, ignore the master branch and use gh-pages instead. In my repo, I’ve got a README in master telling you you’re in the wrong place. You can set the HEAD for the github repo (which is what gets checked out when you clone it, plus github shows it by default when you visit the project in a browser) under the settings page with the “Default Branch” option.

Github makes it super easy to point your own domain at a github-hosted blog. See the custom domain docs. One thing I got concerned about unnecessarily was whether having multiple subdomains all pointing to YOU.github.io via CNAME would confuse things. It doesn’t. By the time the DNS request finishes, you’ve got the same IP address in either case.

Jekyll builds static pages, and doesn’t come with any templates to turn your text into something beautiful in a browser. Github’s site generator has some built-in templates for static sites, but this is a blog, baby. Totally different. Expect to dive in and write some markup yourself.

I’ve been doing a lot of desktop development at Yorba, so my modern HTML chops are a little rusty. It’s been great to get back in the web world and get up to speed on what I’ve been missing the last couple years. Like, this new <time> tag. It’s like, does it have a pubdate attribute or not, am I right?

Suffice it to say, I’m learning some new practices, and trying to unlearn some old habits. I’m working on it.

And that’s all I have to say about setting up a new blog. For now.