🍇 Open Graph Generator made using @cf-wasm/og on a Cloudflare Worker, for personal use.
Feel free to fork it and use it for your website!
The static pages (/, /builder) are exported by Next.js and served by
Cloudflare. The image routes under /api/* run in a Worker (worker/), which
caches every rendered image by URL.
yarn install- Set
NEXT_PUBLIC_DEPLOYMENT_URLin.env.productionto your domain (includehttps://). - Optional: replace
public/images/logo.jpgwith your logo, same file name. It is the default logo whenlogois not passed. yarn deploy(or connect the repo under Workers & Pages in Cloudflare with build commandyarn buildand deploy commandnpx wrangler deploy). This repo is connected that way, so every push tomaindeploys automatically.
Local preview: yarn preview serves on http://localhost:8787.
Query:
/api/general?siteName=Your Site Name&description=Lorem ipsum&theme=light
/api/general?templateTitle=Page Name&siteName=Your Site Name&description=Lorem ipsum&theme=light
/api/general?siteName=Your Site Name&description=Lorem ipsum&theme=dark
/api/general?templateTitle=Page Name&siteName=Your Site Name&description=Lorem ipsum&theme=dark
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
/api/general?siteName=Your Site Name&description=Lorem ipsum&theme=dark&logo=https://docs.thcl.dev/apple-icon-180x180.png&logoWidth=120




