Skip to content
/ og-img Public

A simple opengraph image generator for blogs and social media.

Notifications You must be signed in to change notification settings

pskirde/og-img

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

og-img

og-img is a simple tool to create on the fly opengraph images for blogs or social media posts. It creates dynamic images based on the url.

For a real demo you can look at: og-img.com

Setup

git clone git@github.com:pskirde/og-img.git
cd og-img

Make some changes to the Caddyfile and change the email to your own email adress and domain.

{
    # Email for Let's Encrypt notifications
    email example@example.com
}

# Replace example.com with your domain
example.com {
    ....

Change example@example.com and example.com accordingly.

docker compose up -d

Example usage

You simply change the URL to whatever opengraph image you want to generate. The following url will generate the image with the text "Preview Text".

https://yourdomain.com/Preview%20Text/og.png

If you would need a text called "Please star this repository":

https://yourdomain.com/Please%20star%20this%20repository/og.png

You then can simply enter the images to your blog site or social media posts inside the meta tags of the html header.

<meta property="og:image" content="https://yourdomain.com/Please%20star%20this%20repository/og.png" />

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

About

A simple opengraph image generator for blogs and social media.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published