diff --git a/README.md b/README.md index 128e32800..0ef8d987a 100644 --- a/README.md +++ b/README.md @@ -1,74 +1,5 @@ > **Warning** This repo is outdated and only works with Node.js 14. Please use [@vercel/og](https://vercel.com/blog/introducing-vercel-og-image-generation-fast-dynamic-social-card-images) for new projects. > > If you have a problem that reproduces using [the playground](https://og-playground.vercel.app), please create an issue in the [satori](https://github.com/vercel/satori) repo. - +> > For all other issues with `@vercel/og`, please reach out to [Vercel Support](https://vercel.com/help#issues). - ---- - -Deploy with Vercel - -# [Open Graph Image as a Service](https://og-image.vercel.app) - - - - - -Serverless service that generates dynamic Open Graph images that you can embed in your `` tags. - -For each keystroke, headless chromium is used to render an HTML page and take a screenshot of the result which gets cached. - -See the image embedded in the tweet for a real use case. - - -## What is an Open Graph Image? - -Have you ever posted a hyperlink to Twitter, Facebook, or Slack and seen an image popup? -How did your social network know how to "unfurl" the URL and get an image? -The answer is in your ``. - -The [Open Graph protocol](http://ogp.me) says you can put a `` tag in the `` of a webpage to define this image. - -It looks like the following: - -```html - - Title - - -``` - -## Why use this service? - -The short answer is that it would take a long time to painstakingly design an image for every single blog post and every single documentation page. And we don't want the exact same image for every blog post because that wouldn't make the article stand out when it was shared to Twitter. - -That's where `og-image.vercel.app` comes in. We can simply pass the title of our blog post to our generator service and it will generate the image for us on the fly! - -It looks like the following: - -```html - - Hello World - - -``` - -Now try changing the text `Hello%20World` to the title of your choosing and watch the magic happen ✨ - -## Deploy your own - -You'll want to fork this repository and deploy your own image generator. - -1. Click the fork button at the top right of GitHub -2. Clone the repo to your local machine with `git clone URL_OF_FORKED_REPO_HERE` -3. Change directory with `cd og-image` -4. Make changes by swapping out images, changing colors, etc (see [contributing](https://github.com/vercel/og-image/blob/main/CONTRIBUTING.md) for more info) -5. Remove all configuration inside `vercel.json` besides `rewrites` -6. Run locally with `vercel dev` and visit [localhost:3000](http://localhost:3000) (if nothing happens, run `npm install -g vercel`) -7. Deploy to the cloud by running `vercel` and you'll get a unique URL -8. Connect [Vercel for GitHub](https://vercel.com/github) to automatically deploy each time you `git push` 🚀 - -## Authors - -- Steven ([@styfle](https://twitter.com/styfle)) - [Vercel](https://vercel.com) -- Evil Rabbit ([@evilrabbit](https://twitter.com/evilrabbit_)) - [Vercel](https://vercel.com) diff --git a/public/index.html b/public/archive.html similarity index 98% rename from public/index.html rename to public/archive.html index d502fd044..10e7ad29c 100644 --- a/public/index.html +++ b/public/archive.html @@ -46,7 +46,7 @@

What is this?

- + diff --git a/vercel.json b/vercel.json index b8af875e1..b3f1b52b1 100644 --- a/vercel.json +++ b/vercel.json @@ -1,11 +1,8 @@ { "$schema": "https://openapi.vercel.sh/vercel.json", - "regions": ["all"], - "functions": { - "api/**": { - "memory": 3008 - } - }, + "redirects": [ + { "source": "/", "destination": "https://og-playground.vercel.app" } + ], "rewrites": [ { "source": "/(.+)", "destination": "/api" } ] diff --git a/web/index.ts b/web/archive.ts similarity index 100% rename from web/index.ts rename to web/archive.ts