From Blogger to Ghost
2 min read


I've been using Blogger for quite some time, but over the last several years I've wanted to switch to something that would enable me to use markdown to compose my posts. I had considered switching to Octopress, but when I first saw the Ghost Blogging Platform on Kickstarter I knew that is where I wanted to migrate. And of course, since I enjoy JavaScript so much, I like that Ghost is written in Node.js.


So, how did I make the transition from Blogger to Ghost? Well, it wasn't too bad. Thankfully Windows Azure has Ghost listed in its web site gallery New->Compute->Web Site->From Gallary, which made it really easy to get started.

azure ghost PNG

For most of this phase I followed the excellent instructions from Jeremiah Billmann's (@jbillmann) post entitled Installing Ghost from the Azure Web Site Gallery.

Note: You may also be interested in setting up Ghost from the command line. If so, Scott Hanselman (@shanselman) covered this in a great post entitled How to install the nodejs Ghost blogging software on Azure Websites


The next step was to somehow migrate my posts from Blogger over to Ghost. Unfortuantley, there isn't a straightforward way to do this yet. The next version of Ghost is supposed to have more migration tools and plugins, but for now there is a import from WordPress feature.

So, what I did was create a temporary WordPress blog from the Azure Web Site Gallery and import all of my Blogger posts into it. Then I installed the Ghost WordPress Plugin, which exports WordPress posts to a JSON format that Ghost can import.

import blogger PNG

At that point you can navigate to your Ghost blog... //yourdomain/ghost/debug/ and you'll be presented with a simple GUI to import the JSON file you exported from WordPress.

import tool PNG

Visual Studio Online

In order to make modifications to Ghost once I installed it I decided to go ahead and use the new Visual Studio Online "Monaco" Code Editor that was recently released.

visual studio online PNG

I've been pleased with my experience thus far and I look forward to see this online tool mature.

You can learn more about this tool from @jongalloway's recent blog post entitled A look at the new Visual Studio Online "Monaco" code editor

URL Rewrite

The current version of Ghost doesn't have any mechanism for URL Rewritting, so I dug into the server.js file and added some custom routes to map my old Blogger URL structure to the new structure. Unfortunately, the slugs on Blogger and Ghost ended up being different so it made the process more manual than I had wanted, but ohh well.

function redirectFromBlogger(req, res, next) {
return res.redirect(this);
view raw server.js hosted with ❤ by GitHub


Installing the Disqus commenting widget on Ghost wasn't difficult. All had to do is to edit the content/themes/casper/post.hbs template and pasted in the following snippet right before the ending </article> element.

<div id="disqus_thread"></div>
<script type="text/javascript">
var disqus_shortname = 'your-short-name';
var disqus_identifier = "{{@blog.url}}";
(function() {
var dsq = document.createElement('script');
dsq.type = 'text/javascript';
dsq.async = true;
dsq.src = '//' + disqus_shortname + '';
(document.getElementsByTagName('head')[0] ||
Please enable JavaScript to view the
<a href="">comments powered by Disqus.</a>
<a href="" class="dsq-brlink">
comments powered by <span class="logo-disqus">Disqus</span>
view raw ghost-disqus.html hosted with ❤ by GitHub

Trying to match up my Disqus comments from Blogger to Ghost took a bit of work as well since the identifier was the post URL and as I mentioned above that has changed.

Thankully Disqus has some migration tools built to assist with this issue. I used the URL Mapper tool which let me redifine the URLs associated with particular comment threads.

disqus csv PNG

You can provide a CSV file mapping the old URL to the new URL and it will change the mappings for you. The following is an example of what one of the lines from the CSV looks like.


The migration was an interesting exercise and I already enjoy blogging on this platform much better already. Ghost has a lot of growth ahead of it and I look forward to upgrading as new releases are published.

Edit post on GitHub

Ways to Remove Those Pesky console.log Statements
New Pluralsight Course: jQuery-free JavaScript