2.0.0
What's Changed
- HTML Inspect in dev environment by @neg4n in #4
- Add example usage of TailwindCSS with next-api-og-image by @neg4n in #5
Breaking changes
- Create ability to provide React template by @neg4n in #12
-
From now on, you can provide your template in HTML or React syntax.
-
Template provider functions are now nested within
template
. -
Short note about migrating legacy (
<2.0.0
) code to this releaseSnippet
import { withOGImage } from 'next-api-og-image' export default withOGImage({ html: ({ myQueryParam }) => `<div>🔥 ${myQueryParam}</div>` }) // ⇩⇩⇩⇩⇩⇩⇩⇩⇩⇩⇩⇩⇩⇩⇩⇩⇩⇩⇩⇩⇩⇩⇩⇩⇩⇩⇩⇩⇩⇩⇩⇩⇩⇩⇩⇩⇩⇩ import { withOGImage } from 'next-api-og-image' export default withOGImage({ template: { html: ({ myQueryParam }) => `<div>🔥 ${myQueryParam}</div>`, }, })
More info
-
Details
Full Changelog: https://github.com/neg4n/next-api-og-image/commits/2.0.0