How to setup a “Blog” from an empty repository guide/tutorial 2025

The page loads fine, but there is a console error of:

/build?_rsc=1ld0r:1
Failed to load resource: the server responded with a status of 404 ()

I took the steps of adding the netlify.toml file with this info:
[build]
command = “npm run build”
publish = “.next”
[[plugins]]
package = “@netlify/plugin-nextjs”

but it still did not resolve this issue. here is my code GitHub - carina-codes/prismic-mgl

please help! thank you

Hello @carinacodes
It appears that in your Hero section, you have a button that is linking to a non-existent page "build." I believe your Next app is trying to prefetch this because there are links on the page. Since this page doesn't exist, this is causing your console 404 error.
This is your button object at the moment:

button: {
    link_type: 'Web',
    key: '670fd880-5a6a-4a21-8858-dae57473b846',
    url: '/build',
    text: 'Button Text'
  }

I also noticed that you don't have your routes configured in your prismicio.ts file. This may become an issue.

Welcome to the Prismic community! We're glad you're here. :flexed_biceps:

2 Likes

Hi, I am trying to setup a blog in the best way possible by adding onto this repo GitHub - carina-codes/prismic-mgl (using next js) . I was following this tutorial Build a Next.js Blog: A Step-by-Step Guide but the examples look like it is from an outdated UI, and it is referencing from selecting the "Minimal Starter" vs empty repository which makes it difficult to follow. Is there an updated tutorial on how to setup a blog with next js?

Hopefully, after setting up the blog feature, I am looking to see how to use tags, categories, figure out how to distribute the same content to other websites, and how to use multi-language.

Hello again @carinacodes
You're right. The blog post you are referring to is a bit older. However, it is still using the app router in Next and slicemachine, so the concepts do still apply. I have borrowed heavily from the work shown on Prismic's YouTube channel. I highly recommend visiting that and watching their full-length courses on building Next sites. The portfolio video will cover creating a blog. TLDR; you want a page type called Post (for your blog posts). You want a page called Blog. You want a slice (I call it ContentIndex) that lists paginated content by type. You can use this slice to pull the x number of most recent blog posts or other content types for instance portfolio entries. I hope this helps some.

3 Likes

Thank you for the guidance! I used your direction as a foundation to build out the blog feature. With the help of ChatGPT and a lot of troubleshooting, we finally achieved a clean, working result that passed deployment. Appreciate your support :) cheers!

2 Likes