Skip to content
OwnDocs
Feature

Dynamic Open Graph images

Every documentation page gets its own 1200×630 social preview, generated on request from the page title, breadcrumb path, and description.

  • The /og route handler renders a 1200×630 PNG with the next/og ImageResponse API. Nothing static is checked into the repo, and no third-party service is called.
  • Each page builds its own /og URL carrying the title, breadcrumb, and description as query parameters, so the card matches the page it belongs to.
  • Page metadata sets that URL as the openGraph image and as the Twitter card image, with the card type set to summary_large_image so it fills the preview.
  • The response carries a one-year immutable Cache-Control header, so your own CDN or reverse proxy can serve a rendered card instead of re-rendering it per request.
  • Authors never create or upload an image. Add a page and its card exists.

Our documentation site is built with OwnDocs, running the same code you receive.