https://github.com/codemod-com/open-graph-api
https://github.com/codemod-com/open-graph-api
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/codemod-com/open-graph-api
- Owner: codemod-com
- Created: 2024-02-07T18:57:00.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-12T15:00:40.000Z (about 2 years ago)
- Last Synced: 2025-02-12T11:17:09.560Z (about 1 year ago)
- Language: TypeScript
- Homepage: https://open-graph-api-ten.vercel.app
- Size: 608 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
---
name: Open Graph Image Generation
slug: og-image-generation
description: Compute and generate dynamic social card images with React components.
framework: Next.js
useCase: Edge Functions
css: Tailwind
deployUrl: https://vercel.com/new/clone?repository-url=https://github.com/vercel/examples/tree/main/edge-functions/vercel-og-nextjs&project-name=vercel-og-nextjs&repository-name=vercel-og-nextjs
demoUrl: https://og-examples.vercel.sh/api/static
relatedTemplates:
- nextjs-boilerplate
- aws-s3-image-upload-nextjs
- platforms-starter-kit
- blog-starter-kit
---
# Vercel OG + Next.js
This example shows how to use [Vercel OG](https://vercel.com/docs/concepts/functions/edge-functions/og-image-generation) with Next.js.
## Demo
- [Static Text](https://og-examples.vercel.sh/api/static)
- [Vercel Card](https://og-examples.vercel.sh/api/vercel)
- [Dynamic Text from URL Query](https://og-examples.vercel.sh/api/param)
- [Embed SVG Image](https://og-examples.vercel.sh/api/image-svg)
- [Dynamic PNG Image Based on URL Queries](https://og-examples.vercel.sh/api/dynamic-image?username=vercel)
- [Custom Font](https://og-examples.vercel.sh/api/custom-font)
- [Emoji](https://og-examples.vercel.sh/api/emoji)
- [Languages](https://og-examples.vercel.sh/api/language)
- [Encrypted Token](https://og-examples.vercel.sh/encrypted/a)
## How to Use
You can choose from one of the following two methods to use this repository:
### One-Click Deploy
Deploy the example using [Vercel](https://vercel.com?utm_source=github&utm_medium=readme&utm_campaign=vercel-examples):
[](https://vercel.com/new/clone?repository-url=https://github.com/vercel/examples/tree/main/edge-functions/vercel-og-nextjs&project-name=vercel-og-nextjs&repository-name=vercel-og-nextjs)
### Clone and Deploy
Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [pnpm](https://pnpm.io/installation) to bootstrap the example:
```bash
pnpm create next-app --example https://github.com/vercel/examples/tree/main/edge-functions/vercel-og-nextjs
```
Next, run Next.js in development mode:
```bash
pnpm dev
```
Deploy it to the cloud with [Vercel](https://vercel.com/new?utm_source=github&utm_medium=readme&utm_campaign=edge-middleware-eap) ([Documentation](https://nextjs.org/docs/deployment)).