Ghost CMS and NextJS On-Demand Revalidation - Step-by-Step Tutorial

Опубликовано: 11 Апрель 2025
на канале: Web Dev Fuel
1,058
23

In this video you'll learn how to deploy a NextJS website from scratch without Vercel by setting up a Ubuntu server on Digital Ocean, using NGINX proxy server to handle HTTP requests and pm2 to run the node process in the background.

-----------------------------

Related Videos:
Deploy NextJS from Scratch:    • Deploy NextJS Website From Scratch (w...  
React Router Protected Routes:    • Master React Router Protected Routes ...  
useContext Hook:    • Build a Simple Application Sidebar: E...  
useReducer Hook:    • Simplify Your React Forms with useRed...  

-----------------------------

Table of contents:
00:00 - Walkthrough of Ghost and Next.js deployments
03:04 - Clean-up Next.js local project and start development process
04:14 - Walkthrough of Ghost Content API
05:15 - Create Ghost custom integration
07:35 - Add getStaticProps function to posts index to fetch all posts
14:37 - Add HTML to display posts index
18:10 - Add getStaticProps and getStaticPaths functions to single post to fetch individual posts
29:21 - Add HTML to display individual posts
34:16 - Setup revalidate API endpoint inside Next.js project
41:47 - Add Ghost webhooks to revalidate on create, update and delete post
54:04 - Test revalidate endpoint with API client
55:45 - Update Ghost posts and confirm changes on Next.js
59:25 - Conclusion