Overview
The professionals who used to create websites know straight away that WordPress is a great system to create blogs, it’s even more interesting since you can build Apps on top of it if you have the skills to, despite that, it comes at the sacrifice of simplicity like any multi-purpose system and let’s not forget about the difficulty to maintain a WordPress installation against all the security threats around. PHP is the programming language in use for WordPress while Ghost is powered by a Full-Stack JavaScript architecture.
In this tutorial, we’ll cover the advantages and the reasons behind our choice to use Ghost for our professional articles instead of any other traditional blogging CMS.
The YouTube Channels in both English (En) and French (Fr) are now accessible, feel free to subscribe by clicking here.
What is Ghost?
Ghost is a headless CMS built mainly using JavaScript as the programming language, the front-end is pure HTML, CSS, and JS codes with a backend put in place using NodeJS as server-side runtime.
Generally, headless in the tech sphere means the backend part is given and is built in a way to welcome any front-end implementation at our will depending on what we are trying to achieve. The particularity with Ghost is that it gives not only the backend but also a front-end implementation which is optional since you have the option to make it private (deactivate) and then plug in your custom front-end to link it with the system behind, it also has a special tool (JavaScript ContentApi library) that REALLY simplifies the linkage with the backend so it’s very appealing to any developer by only calling a few functions to query the App data.
The big difference between traditional CMS and Ghost lies at the architecture level, the first is generally a big monolithic App while the latter is a more modern approach described as a service-based model which can be easily integrated with Jamstack technologies to make it even faster.
The Drastic Shift
A blogger principally needs a system to write and publish articles, it’s his most essential tool to have, nothing more and nothing less, even with a personal Note App he can proceed but it won’t be available publicly. Telling that, we can clearly see how traditional CMSs come with a lot of overheads that are not even needed most of the time since at the core they are built to be multi-purpose.
Our past experience on projects allowed us some free thought about which platform should be best for our blogging journey, it’s a difficult task since nowadays there are many alternatives but in the end, the choice can still be relative to some preferences who serve the most your business.
Firstly, what was certain is that we wanted to align the speed, simplicity, extensibility, and easy customization of the Frontend while controlling every corner of the system behind, moving components to build a more decentralized aware architecture that is scalable at multiple levels in contrary to the general idea of the ready-to-go 5 minutes Cpanel installation.
We moved apart from the WordPress-like scenarios to something that really defines us, we opted for a headless CMS instead and the great option in our path was Ghost. That way, we will have more control over the choices of our front-end look and feel, and the tools to use for other things around.
JavaScript Influence on Our Decision
At some points, it became evident that we needed to build our platform around JavaScript, not only because it’s a great programming language but also because of the level of extensibility offered by Ghost backend and the speed while applying Jamstack has been very seducing.
Simply said, Jamstack is about improving the user experience on websites, it puts more emphasis on the rendering speed of web pages, on security, and scalability; more details are given in this write-up.
Another argument that’s a plus for our team building is that it’s generally easier to find JavaScript developers rather than looking for PHP (or any other) ones, in fact almost 50% of software developers can develop Apps using JavaScript. The industry seems to follow that rumor stating that every software developer is a JavaScript developer ?
As additional evidence, according to 2021 reports (based on actual usages and also on surveys) published by GitHub and StackOverflow, we can clearly see that JavaScript has been topping the most used programming languages for quite some time now, and it’s one of the most used languages of the web:
This CMS comes fully featured as well, so we could have spun it up and used it straight away as other traditional CMSs work, but the headless part of it is simply a ready-made backend with all the functionalities that a blog needs like:
- Editing and publishing articles.
- Managing free and paid memberships.
- Newsletter capability.
- User management along with login and logout.
Ghost + NextJS at the Wedding Night
Sounds too techie, right? YES, it just sounds like a difficult setup, but it’s not wide enough to be afraid of for common users. In our desire to look for maximum speed while using new accessible technologies to build our blogging platform, we fell on Jamstack and its promising static deliveries of dynamic content, it’s a new paradigm so it may sound very unfamiliar and difficult.
First, we deployed Ghost in private mode, and then we used this Jamstack template created by Joost Jansky, a well-written Jamstack site using the default and famous Casper template for the design. Simply said, that opensource starter template serves our blog posts and basic features in a static manner, so most of the page generation happens at build time while performing some changes either in the frontend source code (visual part of the blog) or in the CMS side (data: articles, authors, and settings).
For our case, the real magic behind the Jamstack capabilities is brought to us by NextJS, a very popular React framework in use for building Apps that need server-side rendering and static generation by pre-rendering some resources.
The couple Ghost + NextJS is actually deployed using Vercel (NextJS creator), and we have set up a small CI/CD workflow that triggers page re-generation whenever changes occur either from our source code or most importantly from our content producer team.
Ghost Editing Experience and Integration
As a team of developers and writers, we have quickly taken into the Ghost editing tool which is very close to Medium one. It’s like a simple scratchpad in which you can focus on the content you want to deliver to your readers.
Ghost wasn’t built today, it’s backed by a team of well-rounded software engineers and content producers who work hard to make it even better day after day. It’s an open-source project as well and the development is transparently happening on their GitHub repository. As part of their work, that team plus the community around the globe have built numerous integration features to add more flesh to a Ghost-backed site/App.
As an example, all the images in this article are uploaded to our S3 bucket which is coupled to AWS CloudFront as CDN for faster deliveries globally. NumericaIdeas uses ghost-storage-adapter-s3 which adds up the necessary to link our App with AWS S3 for assets storage.
Here’s the official list of well-known Ghost integrations as of today, before building yours maybe you should make sure something similar isn’t yet available, that might save you development time as it has been the case for us. So in the end it’s similar to WordPress’s plugin system.
We inform you that we open-sourced our architecture, so the following article covers all the details about our infrastructure and how it has been designed to scale:
———————
We have just started our journey to build a network of professionals to grow even more our free knowledge-sharing community that will give you a chance to learn interesting things about topics like cloud computing, software development, and software architectures while keeping the door open to more opportunities.
Does this speak to you? If YES, feel free to Join our Discord Server to stay in touch with the community and be part of independently organized events.
———————
Conclusion
To summarize, what we think is that Ghost is great for minimalist endeavors, for those who want to deeply focus on their writing schedules more than anything else. It can include multiple integrations to extend its core features, but its main purpose is to be a more comfortable alternative for people who are seeking a tool to express themselves to their readers in a very efficient way.
Thanks for reading this article. Like, recommend, and share if you enjoyed it. Follow us on Facebook, Twitter, and LinkedIn for more content.