Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[UPDATE OUTDATED CONTENT] How To Create An SSG Static Site Generator Post Update to use Strapi 5 and Next 15 #1603

Open
PaulBratslavsky opened this issue Feb 4, 2025 · 5 comments
Assignees
Labels
Beginner Expertise In progress Tutorial being created Outdated content If content is outdated

Comments

@PaulBratslavsky
Copy link
Contributor

Description

Link of the content

https://strapi.io/blog/how-to-create-an-ssg-static-site-generation-application-with-strapi-webhooks-and-nextjs

What do you all think?
👍 Nice!
❤️ I love it!
🚀 I can help you!

@strapi-bot
Copy link

This issue has been mentioned on Strapi Community Forum. There might be relevant details there:

https://forum.strapi.io/t/creating-an-ssg-static-site-generation-application-with-strapi-webhooks-and-nextjs/25407/9

@paulayuk
Copy link

paulayuk commented Feb 6, 2025

Hi @PaulBratslavsky

I am interested in writing an update for this article.

can I go ahead?

@Theodore-Kelechukwu-Onyejiaku
Copy link
Collaborator

Hi @paulayuk,

Thank you for showing interest. Could you please share an outline?

Thank you.

@paulayuk
Copy link

paulayuk commented Feb 8, 2025

Hi @Theodore-Kelechukwu-Onyejiaku

Here is the outline

How to Create a Static Site Generation (SSG) Application with Strapi 5 and Next.js 15

What is your article idea?

This tutorial walks through how to create a Static Site Generation (SSG) application with Strapi 5 and Next.js 15.

What are the objectives of your article?

Creating a Static Site Generator (SSG) application using Strapi V5 and Next.js V15:

1. Introduction

  • Overview of SSG and its benefits.
  • Introduce Strapi 5 and Next.js 15, highlighting the new features and improvements in both.
  • Describe the use case of building a blog or static site with SSG using Strapi and Next.js.
  • Explain how Strapi’s headless CMS and Next.js work together.

2. Prerequisites

  • List prerequisites: Node.js, Next.js 15, Strapi V5.
  • Links to the necessary documentation or installation guides.

3. Setting up your Strapi Backend

Creating a Strapi 5 App:

  • Set up the latest version of Strapi and initialize a new project.
  • Walk through configuring the backend

Adding Content Types:

  • Define content types, such as Articles or Pages.
  • Explain the flexibility Strapi provides in creating custom content types.

Configuring Webhooks:

  • Set up webhooks in Strapi to trigger rebuilds on content updates.
  • Define webhook payloads and the conditions that will trigger the webhook.

4. Setting up your Frontend with Next.js 15

Create the Next.js App:

  • Initialize a new Next.js 15 project and set up the folder structure.
  • Install necessary dependencies.

Integrating Strapi with Next.js:

  • Fetch data from the Strapi API.
  • Use Next.js to pre-render pages from the fetched content from Strapi.

Static Site Generation (SSG):

  • Set up SSG with Next.js
  • Discuss how content from Strapi is fetched at build time for a static output.

Create the Blog Pages:

  • Build the blog homepage, article list, and individual article pages.
  • Implement Next.js' dynamic routing and static page rendering.

5. Deploying the Static Site

  • Walk through deploying the Next.js frontend and Strapi backend.
  • Configure Netlify/Vercel for deploying the Next.js app and setting up webhooks to trigger builds on content changes.

6. Conclusion

  • Summarize what was taught in the tutorial
  • Highlight the importance of webhooks in triggering rebuilds for static sites.

Objectives:

  • Learn how to use Strapi V5 to manage content for a static site.
  • Understand how to use Next.js 15 for static site generation.
  • Implement webhooks to automate site rebuilds upon content changes.
  • Deploy and manage the static site with continuous deployment on platforms like Vercel or Netlify.

Technologies:

  • Strapi V5: CMS for managing content.
  • Next.js 15: For building static sites using SSG.
  • Vercel/Netlify: For deployment and hosting.
  • Tailwind CSS: Optional styling framework (for frontend design).

User story:

As a content creator, I want to manage my blog posts using Strapi, and I need the blog to be statically generated with Next.js for fast performance. After adding new content in Strapi, the site should automatically rebuild and deploy, keeping everything up to date without manual intervention.

What is your expertise as a developer or writer?

Intermediate.

What type of post is this?

Tutorial

Terms & Conditions

  • I have read the Write for the Community program guidelines.

@Theodore-Kelechukwu-Onyejiaku
Copy link
Collaborator

Hi @paulayuk ,

Thank you for your outline.

Please proceed while keeping in mind the comments here: https://forum.strapi.io/t/creating-an-ssg-static-site-generation-application-with-strapi-webhooks-and-nextjs/25407/9

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Beginner Expertise In progress Tutorial being created Outdated content If content is outdated
Projects
None yet
Development

No branches or pull requests

4 participants