Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

og

Hosted at https://og.maximilianschmitt.me

Read the blog post: https://maximilianschmitt.me/posts/generate-social-media-preview-images/

Usage

In JavaScript:

const encodedText = encodeURIComponent(ogImageText);
const ogImageURL = `https://og.maximilianschmitt.me/${encodedText}.png`;

In HTML:

<meta
  property="og:image"
  content="https://og.maximilianschmitt.me/Hello%20world.png"
/>
<meta name="twitter:title" content="Hello world" />
<meta
  name="twitter:image"
  content="https://og.maximilianschmitt.me/Hello%20world.png"
/>
<meta name="twitter:card" content="summary_large_image" />

About

Node.js service to automatically generate social media preview images for blog posts

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published