This is a quick note on my migration from Ghost to Hexo. In my previous post, I wrote my thoughts on my choice of Markdown editor for blogging. This triggers me to think more on my blogging choice. I presume some of you may have also encountered this situation when you spent much more time on figuring out the best choice on the blogging systems (or editors) than to write blog posts itself. This seems to be a very true case here for myself. Luckily, the technology and enthusiast have grown so fast that I have now finally found my perfect choice for both blogging and editor: Hexo + iA Writer.

## Why am I back to files rather than databases?

Well, seems like to me the capability to easily editing files regardless of the location and Internet connectivity becomes a pretty important feature. Ghost is clean, simple, easy to use, but it still requires databases and plenty of backend services to work, and there is no plain-text dump for the blog posts. Besides, if you want to work offline, you need to be prepared for a bunch of copy and pastes, especially when you need to do edits multiple times.

## Why Hexo, not Jekyll?

Jekyll seems to be a pretty good platform, or even the de facto static blog generator. But as I mentioned before, the file structure of Jekyll seems to be a bit unnecessarily complicated, and the grammar for using Jekyll to create new posts seems to be a bit more complex, especially considering that Hexo has also automatically filled in a bunch of meta information for you already.

Personally, Hexo’s folder structure is much more cleaner and reasonable to jekyll. For example, when I start use the Hexo, the empty example blog file folder looks like this:

As you can see, there are quite few folders in the setup. The node_modules folder is for Hexo’s packages, which we don’t need to worry at all. The scaffolds folder holds the template styles, such as post or page. The source folder maintains all blog posts and media. The themes folder contains all the themes of course. In my opinion, it is the cleanest setup I’ve ever seen.

## How do you migrate from Ghost to Hexo?

Easy peachy. Just use the following project. Everything you need is in its project description. The procedure is surprisingly easy. The only part that is still missing from the original blog is the static pages, which I yet to figure out how to create on Hexo. But I was able to import more than 30 posts from my Ghost blog successfully, even with all time and tag information retained.

https://github.com/jasonslyvia/hexo-migrator-ghost