Skip to content

2.0.0

Compare
Choose a tag to compare
@neg4n neg4n released this 14 Oct 21:44
· 47 commits to main since this release
1bb712f

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 release

      Snippet

      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

      Check out the specification in README!

Details

Full Changelog: https://github.com/neg4n/next-api-og-image/commits/2.0.0