ISR Blog with Next.js and WordPress

R
Renaudil y a 2 jours
0

Description

An Incremental Static Regeneration Blog Example Using Next.js and WordPress

npx boilerapp isr-blog-nextjs-wordpress

Documentation

A Feature Rich App Router WordPress Example

This is an example on how you can build a Next.js 14 project (with App Router), using WordPress as the data source.

Key features:

  • robots.ts: This automatically gets the robots.txt of the API route and serves it on the /robots.txt route.
  • sitemap.ts: This automatically gets all paths from the API and generates a sitemap to serve on the /sitemap.xml route.
  • middleware.ts: This contains a middleware function that checks the users path for stored redirects, and redirects the user if a match is found.
  • [[...slug]]: This is the catch-all route that is used to render all pages. It is important that this route is not removed, as it is used to render all pages. It fetches the ContentType and renders the corresponding
  • not-found.tsx: This page is used for dynamic 404 handling - adjust the database id to match your decired WordPress page, and make sure the WordPress slug is "not-found\

Prix

Gratuit

FREE

Comments (0)

FAQ

Frequently Asked Questions

Have a question? We have the answers. If you can't find what you're looking for, feel free to contact us.

Boilerapp is a community platform dedicated to sharing boilerplates, starter kits, and project templates for developers. Our goal is simple: save you time on initial setup so you can code what really matters. Whether you are looking for a simple code base or a complete SaaS project, you will find it here.

Have more questions?

Our team is here to help. Contact us and we will get back to you as soon as possible.