Our great sponsors
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
-
next-ghost-demo
A demo project demonstrating how to build a NextJS blog with Ghost as a Headless CMS
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
The first thing we need to do is install Ghost on our development machine. Open a terminal and install the latest version of ghost-cli globally using your package manager of choice. I am a yarn man.
The first two commands are self-explanatory. The name of your directory does not matter. The third command, ghost install local, runs a number of scripts and sets you up with a local installation of Ghost hosted at a local url. Usually this url is http://localhost:2368. If you navigate to it in your browser of choice, what you'll see is Casper, the default Ghost theme.
And that's it! If you followed closely you should have a simple NextJS-powered blog using Ghost as a headless CMS. I kept it lean and basic, so that you can build upon this over time. If you are interested in the full example, there is a GitHub repository here. Feel free to clone, fork and go wild.
In this post we'll use NextJS as our front-end framework of choice. With NextJS, we can build a blazing fast front-end and query Ghost for our content.
I have a certain affinity for Ghost, an open-source publishing platform created in 2013 and built on NodeJS. It was the first platform I used to build my website back in 2015, but over time curiosity struck and I moved away from it.