Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ozakione/vercel-og-nextjs
https://github.com/ozakione/vercel-og-nextjs
Last synced: 21 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/ozakione/vercel-og-nextjs
- Owner: OzakIOne
- Created: 2024-01-04T13:50:36.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-01-04T13:50:41.000Z (12 months ago)
- Last Synced: 2024-10-25T15:28:02.390Z (2 months ago)
- Language: TypeScript
- Homepage: https://vercel-og-nextjs-ten-gold.vercel.app
- Size: 211 KB
- Stars: 0
- Watchers: 1
- 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):
[![Deploy with Vercel](https://vercel.com/button)](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)).