Back in February I moved my blog from WordPress to the spiffy new Ghost blog engine.
Since I’m hosting my blog using Azure’s Websites, WordPress was hobbled by the fact that
the free MySQL instance you get has only a few allowed connections. That means if you get
more than just a few visitors some get the dreaded “Can’t connect to the database” message.
That was ugly, so I decided to try Ghost.
Ghost worked great! I even helped my daughter set up a Ghost instance in another Azure Website
for a school project.
Everything was rolling along just swimmingly. I’ve posted more to the blog so far this year
than ever before. My visitor count has been creeping up too. What could possibly go wrong?
Last Wednesday at about 5 pm I decided to check the old Adsense account. I don’t like to brag, but
I’ve been making a few cents each day. That’s not a euphemism unfortunately. I’ve been literally
earning one or two cents per day most days.
Imagine my surprise when Google informed me that no one had visited my site that day. At all.
What? Surely something in Googleville must be broken!
I typed in my url and … and … and … waited.
Blank white page.
Where are my alligators?
I had to pop open Chrome’s developer tools and watch the network traffic to see the 500 error.
Checked my daughter’s site. Pristine white pixels as well.
I tried creating a Ghost blog from the Azure gallery. It worked! So I created another one and it
did not work. Uh oh. Something’s wrong here.
I’ll try to shorten a long, ugly story.
Back in February I had debated using Ghost or DocPad for my blog.
Ghost is an actual blog engine with lots of helpful features and DocPad, well, isn’t.
I love the idea of DocPad, but in practice it is a bit fiddly for an active blog.
So I went with Ghost.
Until it died.
I can’t blame Ghost, since nothing changed there.
A couple of evenings spent poring through log files with nothing to show but the vague
feeling that iisnode can’t access certain files (or else the user running the site can’t
access the iisnode DLLs) convinced me to try one of two things:
1) Move to a VM that I manage myself and set up Ghost
2) Create a static site via DocPad and stick with the Azure Website
Neither prospect seemed too darned appealing, but my blog was reduced to a static page saying,
“Hello, I’m stoopid and can’t make my website work.”
I’ll blog more details later, but basically I
- Wrote a Node command line app to read in the Ghost export file
- Did some simple processing of the posts to join up with the tags
- Spit out Markdown files with DocPad metadata
- Set up Docpad
- Add a few plugins (CleanUrls and Paged)
- Adapt the HTML structure and CSS from the Ghost blog to the DocPad blog
- Create a Git repo of the static output
- Store the repo on BitBucket
- Disconnect the Website from the Ghost BitBucket repo
- Delete all the files from the site
- Connect the site to the new, static repo at BitBucket
- Wash, rinse, repeat pretty much all weekend…
At this point the site pretty much looks the same as before.
I’m writing this post in Vim as an experiment to see how easy it will be to post
in DocPad. It is definitely not as convenient as Ghost or WordPress, but I will
soldier on for a bit to see how it goes.
I love the idea of a static site deployed via Git from BitBucket.
The only thing I really need to work out is the tag system. I currently don’t have
a way to update the Posts By Tag page or the Tag Cloud. I plan to play around with
it a bit to see if I can get a solution for that. Frankly Ghost is lacking in that
department as well (it is an alpha or beta product, after all).
Would I recommend DocPad as a blogging tool? No, not really. At least not to someone
who doesn’t have time to spare with the fiddly bits.
Am I going to stay with DocPad? Go back to Ghost? Go back to WordPress? Quit blogging and
live in a cave?
I don’t know yet, but the cave is sounding pretty good.