First Commit!

First Commit!

"New blog, resurrected! After loooooooong procrastination, I finally got the time to resurrect my Ghost blog."


After loooooooong procrastination, I finally got the time to resurrect my Ghost blog. A couple years ago, I rent a shared Web Hosting server to host my portfolio while looking for a job (actually, the real intent was to host a website just for fun...).

I also got a free domain name from NameCheap as a student. That free domain came with free a year of free Ghost instance! That's the first time I got to know of Ghost, and I instantly fall in love! Having used Wordpress before, Ghost is just elegant. It reminded me a lot of journaling in Day One (which I still try to do everyday).

Resurrected - JAMstack

I didn't really know what I was doing back then (and still don't know much now lol).

Ghost was already all setup. So, I was only using what's there. Otherwise, I my perfectionist would kick in and I would try to find the best way to host a blog and never actually get started.

As it turned out though, I hate the idea of shared web hosting. I feel like those shared plan really restricted what I can do. Not being able to take control of my backend feel bad!

Anyway, so I ended up trying something different this time.

Upon doing a bit of research, I stumbled upon the JAMstack (JavaScript, API, Markup). Basically, it leverage CI/CD process to continuously build a static-site with data source from a headless CMS, and serve them, usually through CDN.

The beauty of this setup is that you get the best of both world!

Static-sites

Static-sites are faster, more scalable, and more secure than most dynamic websites. Blogging is one of the best use case for static-sites. After all, you wouldn't normally serve a version of a blog page to one user, then another slightly customized version to another.

Since all user will eventuall get the same version of the page, why not just render that page and store it somewhere instead of pulling from database and rerender it every time?

Nevertheless, static-sites used to be hard to manage and maintain. Static-site generators like Jekyll, and, in this case, Gatsby, helped leviate a lot of those burden of the old-days. But they still require quite a bit of coding knowledge to use.

CMS

A CMS provide ways to create, update, and maintain your content without needing to touch any of the actual code. Wordpress has been the go-to CMS for years. Ghost is a more recent althernative with heavier focus on just being a blogging platform.

The API!

While Ghost itself provide its own, pretty robust, frontend, its Ghost API allow for a much greather possibilities. One could, as we have done here, replace the default frontend altogether in favor of another prefered Web Framework of choice.

With the JAMstack, one would publish new content to the CMS as you would normally do. A webhook would then trigger a rebuild process. The rebuild process usually involve the framework of choice refetching data from the CMS, build all those into static-source, the publish the updated static-site to your web hosting target.

This allow you to have a fully automatic update and deployment of your static sites!

How to set up your own!

Since the tutorial become so long, I have separated it out into another post.


Written by Romson Preechawit

Hi there! I'm a typical geek, designer, developer. Love coding, design, photography, reading, and a lot more. English is not my first language so please help correct my grammar! :)

Romson Preechawit