Upgrade Blog to Next.js 14.1
Shen Lu
Posted on Feb 16, 2024
views
1 min read (153 words)
I have not update my blog for almost 8 mouths from May 2023. Next.js has already been upgraded to the verion of 14.1.0 So it is a time to start upgrading my blog to the latest version of Next.js.
Upgrade from 13.4 to 14.1
-
- Switch Pages Router to App Router
-
- Use Metadata API to define metadata, such as
meta
andlink
tags inside your HTMLhead
element for improved SEO and web shareability.
- Use Metadata API to define metadata, such as
-
- Create an
opengraph-image
ortwitter-image
route to generate a route segment's shared image
- Create an
-
- Switch Prisma ORM to serverless KV with Redis API powered by Upstash
-
- Replace
heroicons
withreact-icons
- Replace
Conclusion
I am very satisfied with the Next.js v14.1 design philosophy, especially in Metadata API and Open Graph image generation. However, Contentlayer was not maintained for a long time. I was trying to find another way to substitute it.