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

Commentaires (0)

FAQ

Questions Fréquemment Posées

Vous avez une question ? Nous avons les réponses. Si vous ne trouvez pas ce que vous cherchez, n'hésitez pas à nous contacter.

Boilerapp est une plateforme communautaire dédiée au partage de boilerplates, de starter kits et de modèles de projets pour développeurs. Notre objectif est simple : vous faire gagner du temps sur la configuration initiale (setup) pour que vous puissiez coder ce qui compte vraiment. Que vous cherchiez une simple base de code ou un projet SaaS complet, vous le trouverez ici.

Vous avez d'autres questions ?

Notre équipe est là pour vous aider. Contactez-nous et nous vous répondrons dès que possible.

ISR Blog with Next.js and WordPress | BoilerApp