Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

omgi

jozefhruska3MIT1.0.5TypeScript support: included

Simple URL builder for OMGI

OMGI, Open Graph protocol, Open Graph image, OG image, generator, custom

readme

OMGI

Generate custom Open Graph images dynamically in a matter of seconds. Choose the template you like and generate the OG image with a simple HTTP GET request.

Learn more at https://omgi.vercel.app.

Usage

Generating an OG image from the "basic" template:

import { getTemplateUrl } from 'omgi';

getTemplateUrl({
  template: 'basic',
  values: {
    heading: '...',
    description: '...',
    badge: '...',
  }
})

Generating an OG image from the "article" template:

import { getTemplateUrl } from 'omgi';

getTemplateUrl({
  template: 'article',
  values: {
    heading: '...',
    description: '...',
    authorName: '...',
    authorAvatarUrl: '...',
    meta: '...',
  }
})