Ghost 0.4.0 - just in time

The people over at Ghost announced that Ghost 0.4.0 was out a few days ago. After a bit of a road block before, I've managed to work around most of the big issues.

If this happens to produce a flood of posts on twitter, or the Xamarin Planet, sorry - I did try to turn off those feeds before doing this, but I'm not sure it worked

The first one is deep folders for pages. I used to use /mobileagent/support/login for the login page, but Ghost doesn't do that - so I've added an Apache rewrite to handle that for me

<VirtualHost *:80>
  # Admin email, Server Name (domain name), and any aliases
  ServerName  www.fastchicken.co.nz
  ServerAlias fastchicken.co.nz

  RewriteEngine on
  RewriteRule ^/rss.xml /rss/ [R]
  RewriteRule ^/mobileagent/support/(\w+) /mobileagent-support-$1 [R,L]
  RewriteRule ^/mobileagent/(\w+) /mobileagent-$1 [R]
  RewriteRule ^/tripwallet/(\w+) /tripwallet-$1 [R]
  RewriteRule ^/maf/(\w+) /maf-$1 [R]
  RewriteRule ^/nearestbus/(\w+) /nearestbus-$1 [R]
// etc

This will map /mobileagent/support to /mobileagent-support, which Ghost works with quite happily.

The second was breaking all my old links. I still get a few comments (well, tweets) on old posts, so I thought it was worth keeping them around. Ghost 0.4.0 supports date-based blog post URLs (which 0.3.0 didn't) so that sorted that out quick-smart.

If I need to edit a page, thanks to one of the Ghost admins, I found out I can just add /edit to the end of the URL and it pops me into the editor UI. I've broken that with my RewriteRules above, but I don't need to edit those pages often, so it's not a huge deal to turn off the rewrites while I edit the pages.

I still can't do footnotes, but I lived without them for a long time, so I'm sure I can work something else out.

I've also moved all of my content from Octopress over to Ghost. Ghost has a handy special url at /ghost/debug/ which lets you upload a JSON file with your posts in it. And it doesn't take long to get the simple Octopress post files into that format. If you want to reuse the code (it's in C#, using Xamarin Studio / MonoDevelop, but should work on windows too), I've put it up on Github. It's not the most elegant code, but it does work (on my machine)

So, onward with the new blogging platform. Ghost is the fourth platform I've used since I started blogging in 2002 (I think, it was a long, long time ago). I started on DasBlog, hosting it on my server on the end of my 128k DSL line, not long after ADSL was available in New Zealand. Then to Wordpress, then Octopress and finally, now, to Ghost.