@ap0nia/svelte-og
v0.0.2
Published
SvelteKit-compatible implementation of vercel-og
Downloads
5
Readme
@ap0nia/vercel-og
Modified version of @vercel/og that's compatible with SvelteKit
Getting Started
- Install the library.
npm install @ap0nia/svelte-og
- Return a dynamically generated OpenGraph image response from a server endpoint.
// src/routes/og/+server.ts
import { SvelteImageResponse } from '@ap0nia/svelte-og'
import type { RequestHandler } from './$types'
import Og from '$lib/components/og.svelte'
export const GET: RequestHandler = async () => {
return new SvelteImageResponse(Og)
}