Published: February 9, 2026

Implementing OGP and RSS in Next.js

How to ship dynamic OGP images and a clean RSS feed early in a Next.js App Router blog project.

1 min read

OGP strategy

Define an opengraph-image route per post and render image metadata from the article frontmatter.

Why dynamic images work well

  • No manual image editing for every post
  • Consistent visual branding
  • Locale-aware text rendering is straightforward

RSS strategy

Generate /rss.xml from published posts only, with stable item URLs.

Required RSS fields

  • title
  • link / guid
  • description
  • pubDate

Common pitfall

Do not include draft: true posts in the feed; otherwise unpublished content leaks into subscribers.

Back to posts