Skip to content

🍇 Open Graph Generator made using @vercel/og for personal use

Notifications You must be signed in to change notification settings

dml0031/og-generator

 
 

Repository files navigation

Open Graph Generator

🍇 Open Graph Generator made using @vercel/og for personal use.

Feel free to fork it and use it for your website!

Deployment Guide

You can achieve deployment fully from the website without cloning the repository.

  1. Fork the repository

  2. Replace the public/images/logo.jpg with your logo. Make sure it has the same file name.

    This is optional, replacing the logo will grant you the ease of using the api without having to add your logo link on the parameters every time.

  3. Deploy to Vercel.

Vercel Configuration Settings

There are some configurations that you need to do:

  1. Add the following to the environment variables. Settings > Environment Variables
Name Value
NEXT_PUBLIC_DEPLOYMENT_URL https://your.domain.com

After configuring, redeploy the project

General OG

Light Mode & Site Name Only

image

Query:

/api/general?siteName=Your Site Name&description=Lorem ipsum&theme=light

Light Mode & Template Title

image

/api/general?templateTitle=Page Name&siteName=Your Site Name&description=Lorem ipsum&theme=light

Dark Mode & Site Name Only

image

/api/general?siteName=Your Site Name&description=Lorem ipsum&theme=dark

Dark Mode & Template Title

image

/api/general?templateTitle=Page Name&siteName=Your Site Name&description=Lorem ipsum&theme=dark

Custom Logo

You can also customize logo by specifying logo, width is defaulted to 100px.

Or you can also add logoWidth and logoHeight by specifying pixel number

image

/api/general?siteName=Your Site Name&description=Lorem ipsum&theme=dark&logo=https://docs.thcl.dev/apple-icon-180x180.png&logoWidth=120

About

🍇 Open Graph Generator made using @vercel/og for personal use

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 85.4%
  • JavaScript 9.1%
  • CSS 4.8%
  • Shell 0.7%