Setting up the Ghost blogging system on FreeBSD

Ah, a meta blogging post. Sorry, I try to keep these to a minimum…

For those who haven’t been caught up in the hype yet, Ghost is a new blogging system that is much more minimal than WordPress and the other more popular systems. It’s designed to be much smaller and faster (plus it uses a lot of cool tools like node.js, handlebars etc).

I recently tried to set up the 0.3.3 release on FreeBSD and overall it was straight forward. Node.js is available as a port – just make sure that you’re installing the regular node port instead of the node-devel port as the latter will install node 0.11 and Ghost wants to use 0.10.

The only hiccup I encountered was that building the sqlite node module failed, but this post suggested an appropriate workaround by pointing npm at the existing install of sqlite.

First impressions are very good, populating the Ghost blog from this WordPress installation was very easy using the Ghost plugin for WordPress. The contents made it over OK, however Ghost doesn’t support comments, thus the export and re-import loses the existing comments. I’d also have to integrate an external comment system.

Overall I’m pretty excited about Ghost as a blog platform so I’ll be keeping an eye on it. For now though this blog will stay on WordPress.

With Emacs on Windows, make sure you know where your $HOME is

The Gnu Emacs for Windows distribution appears to be pretty good at inferring where a reasonable place for $HOME is, straight out of the box. In my case, said reasonable place was %USERPROFILE%/AppData/Roaming which was an entirely acceptable default.

That is, until several other tools entered the picture and disagreed with Emacs. We’ve recently switched to using git at work and the git ecosystem¬† needed to have some ideas where its home was. I’m using Git Extensions as the “regular” Windows GUI and TortoiseGit for the Windows Explorer integration, plus the awesome Posh-Git that even made me learn basic PowerShell.

All of this worked fine until I threw magit into the mix. I like being able to interact with the VCS directly from Emacs (who doesn’t?) and magit is probably the greatest VCS integration for Emacs. It worked fine as long as I kept the cheat sheet handy, but a colleague of mine pointed out that my magit commits supposedly came from a really funky user that looked very much like the computer guessed my email address rather than the user configured in my git configuration.

Turns out that both git and Emacs respect and look at the HOME environment variable. After settling on a suitable location and adjusting %HOME%, I moved the various dot files into the correct location and can now commit correctly from Emacs with the correct user details. Phew.

Oh, and for those commits that did have the odd username on them, the following commands came in really handy.

To change the author on the current (well, last) commit:

git commit --amend --author="corrected author"

Or if you just want to update the author on the last commit after updating HOME to point at the correct location:

git commit --amend --reset-author