Why I Switched From Ghost CMS to Hugo
Video version - or watch it on YouTube
Or if you prefer to read the article, read on!
Why Move Away From Ghost?
The story for that is here:
But there has been one nagging factor since then:
Why do I even need a database or a server side language?
I mean, it’s a blog. I create content on it. I don’t have users signup or courses or anything at all that requires a backend.
And to be honest, the majority of bloggers and content creators do not need a website backend either
Okay… so what’s the alternative then?
Yes, pure HTML, CSS, and JS. NO server side language.
But who has time for that right? It’s a huge task to manage hundreds of pages. We’re 15 years past that.
Correct. But now we have… static site generators!
Examples include Gatsby, Hugo, Next.js, and Jekyll.
How they work is they will compile all your content and code into a static site for you. Just HTML, CSS and JS. And your hosting solution just serves up your static files (often for free).
There is no dynamic content.
If you change something, add a post, etc., you simply rebuild the new site and push the changes.
So what are the benefits?
- More security. I mean, what’s there to hack? There’s no database. Its all static.
- Lightweight. It’s precompiled. Nothing on the backend to load.
- Easy to deploy. Just generate the static pages and upload. Easily done in an automated script. For my site, I simply push my changes to Github and it kicks off the build and updates for me.
- You can host for free on Netlify, Heroku, and in my case, Digital Ocean App platform (more on that in a few).
So you might be wondering: What about headless Ghost?
Running Ghost headless means that you use Ghost primarily as a backend. You keep the DB and use the Ghost API to interact with the data. That allows you to choose your front end, like React, Vue, etc.
The problem in my specific scenario is that I just don’t need the backend.
Also I would have to pay for hosting for the backend while having my frontend somewhere else running free (sure there are Netlify CMS solutions, etc).
How it really happened (Why Hugo?)
So the idea to swap happened randomly as I came across the ghostToHugo migration GitHub repo.
On a whim I converted all my posts/pages … which led to spinning up a demo site to see if it works, which ultimately led to a working Hugo site on my local computer with all of my own content ready to roll (almost, had to tweak a bit later) in under 10 minutes.
Then that led to me looking for themes, which led to me finding one, and seeing if I could deploy it on Digital Ocean…
And speaking of Digital Ocean…
Digital Ocean App Platform
I’ve been using Digital Ocean since migrating to Ghost. I’m a big fan. (Use that link and you’ll get $100 in Digital Ocean credit. But, of course, with Hugo you won’t need it 😁)
Well I came across their new App platform which makes deploying, managing, and scaling your Apps easy.
I connected the Github repo for my Hugo site, it automatically detected Hugo, and created an appspec build file for me.
Within 5 minutes my site was up and running on the Digital Ocean App platform. I added my domain info and Digital Ocean automatically set up my SSL. I was live in no time.
Now I can write in Markdown (something I enjoy), inside of my VS Code editor (what is more beautiful?), and every time I push any new content or changes to Github a build updates my site automatically.
Hugo was very easy to pick up. Sure there more work to be done on the site but it was a painless transition from Ghost to Hugo (and to Digital Ocean).
@ me on Twitter with questions or suggestions.
** This article may contain affiliate links. Please read the affiliate disclaimer for more details.
You May Also Like
Speed Up Loading of Embedded Videos (not Lazy Loading)
My Favorite Udemy Course of 2021 as a Software Developer
Automate Your Mornings With Logic Apps
In this video, we’ll be using Azure Logic Apps to automate our …