Ghost 1.0 and Zeit's Now

After months of my blog being offline, I had some fun living on the bleeding edge with Ghost 1.0 and Zeit's Now. This combination allowed me to create a blogging experience that offers the best of both worlds between a static site and a traditional, self-hosted CMS.

Choosing Ghost

If you haven't heard of Ghost, it's a "fully open source, hackable platform for building and running a modern online publication." It's available as a paid, hosted service and as an open-source, self-hosted solution.

Ghost has been around for several years, but it just reached 1.0, and it has a beautiful, new markdown-based editor and default theme. 😍

My blog has been offline for several months. I took it down after discovering it being hacked by some script kiddies. The blog was running WordPress, and I had neglected to keep it updated. It was 100% my fault, but it was still really annoying. 🙄

Since taking the blog offline, I had been looking to relaunch it with a different blogging engine. I primarily experimented with static-site generators, namely Jekyll and Gatsby.

I was most excited about Gatsby, because of its novel usage of React and GraphQL to support really flexible static-site generation. It's a fascinating and modern architecture, but I ran into into so many hard-to-debug issues that I found all of my excitement had evaporated.

I then shifted to Jekyll, which I have used on several different projects in the past. However, I wasn't really happy with any of the themes, and I wasn't motivated enough to write my own. One of my goals was to have a really pleasant reading experience with strong typography. I quickly realized good typography is really hard to get right, and a lot of publically available themes don't do a good job with it.

After several weeks of being stuck in a rut, I heard the news about Ghost 1.0 and it got me excited. It seemed to have everything I was looking for, which is essentially a self-hosted Medium-like platform with a clean reading experience with good typography. I was also really impressed by Ghost's editing experience, which is something I wouldn't have gotten with a static-site generator.

I just had one concern – how could I host Ghost in a way that's easy to maintain?

The Setup

I really wanted to use my blog as an opportunity to try out Zeit's Now. I've heard great things about it, and I'm impressed by the developer experience and features they offer (not to mention their branding). To name a few:

  • Great CLI-based workflows for managing deployments
  • Support for Dockerized apps
  • Immutable deployments
  • Automatic HTTP2 support
  • Easy SSL/HTTPS setup (powered by Let's Encrypt)

Zeit helps maintain a GitHub organization, now-examples, that showcase example projects to demonstrate how to use Now with various platforms. They just recently updated their Ghost example to use Ghost 1.0. With this example, I was able to get things up and running retty quickly.

The key constraint is Now deployments are immutable, so any database you "run" on Now must be treated as readonly. Ghost supports SQLite as a database backend, which works really well for immutable deployments. There's no maintenance overhead of havin to run another server for the DB. Content updates are as simple as creating a new deploy.

With this setup, all content creation and editing is done locally. When I finish editing and am ready to publish, I just deploy simply by running now. Each deploy includes a copy of the SQLite DB and all other image media.

To me, this feels like a great middle ground between a real static site and a self-hosted CMS. The deployments are really simple and reproducible – just upload files, npm install, and let Ghost run. There's also peace of mind granted by the fact that the deployments are stateless. If anything happened to the site in production like it did with my last WordPress install, the recovery process would be way simpler. Since all content lives as binary files in a git repository and not somewhere out in production land, recovering from any sort of data corruption is as simple as creating a new deployment.

That said, I realize this is not the ideal set up for a team or larger site, as you have to create a new deploy for every change. However for a small blog like mine, the benefits of this setup's simplicity outweighs the negatives.

Conclusion

I'm really happy with this setup. Ghost 1.0 is delightful to work with, and I really love its default theme. It's wonderful to have such a delightful blogging experience without having to be chained to a for-profit service like Medium. On top of that, it was really fun living on the bleeding edge and trying out new tools and services!