For years my blog has been hosted on wordpress.com. As you have probably guessed from this blog entry's title I chose to host my blog on GitHub Pages going forward.
I had the following goals for my blog migration:
- Generating WordPress-compatible URLs
- Optionally, having a migration path to a new URL naming scheme
The reason I'm even bothering to migrate old blog entries is that I want to be a good internet citizen. I always find it annoying when links break so I'll try to at least do my part. This means migrating the content and generating URLs that are compatible
with WordPress. Luckily I was already using a custom domain name, making it all possible.
WordPress URLs look like this:
Targeting GitHub Pages you then have two options:
- mkdir -p 2008/04/06; touch 2008/04/06/dollarmaps.html
- mkdir -p 2008/04/06/dollarmaps; touch 2008/04/06/dollarmaps/index.html
The first option appears
to work at first; GitHub automatically finds
the '.html' file with the correct name and serves its contents. However, the show stopper for me is that this no longer works if you add a trailing slash, something which WordPress always seems to do. So http://garbagecollected.org/2008/04/06/dollarmaps
works, but http://garbagecollected.org/2008/04/06/dollarmaps/
doesn't. Not acceptable. This means that the only other option is to create directories with an index.html