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

文档

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

评论 (0)

常见问题

常见问题解答 (FAQ)

有问题?我们有答案。如果您找不到想要的答案,请随时联系我们。

Boilerapp 是一个专门用于分享 Boilerplates、入门套件(Starter Kits)和项目模版的开发者社区平台。我们的目标很简单:为您节省初始配置(Setup)的时间,让您可以专注于真正重要的代码。无论您是在寻找简单的代码库还是完整的 SaaS 项目,都能在这里找到。

还有其他问题?

我们的团队随时为您提供帮助。联系我们,我们将尽快回复。