mirror of
https://github.com/LukeHagar/sveltekit-og.git
synced 2025-12-06 04:21:37 +00:00
Updated Readme
This commit is contained in:
14
README.md
14
README.md
@@ -4,8 +4,13 @@ Dynamically generate Open Graph images from an HTML+CSS template or Svelte compo
|
||||
|
||||
## Installation
|
||||
|
||||
```sh
|
||||
npm install -D @ethercorps/sveltekit-og
|
||||
```bash
|
||||
pnpm install -D @ethercorps/sveltekit-og
|
||||
```
|
||||
> Using with Cloudflare Pages or Workers then you have to provide `url` polyfill by just installing it as `devDependency`.
|
||||
>
|
||||
```bash
|
||||
pnpm i -D url
|
||||
```
|
||||
|
||||
## Usage
|
||||
@@ -95,7 +100,8 @@ ImageResponse(
|
||||
element : string,
|
||||
options : {
|
||||
width ? : number = 1200
|
||||
height ? : number = 630
|
||||
height ? : number = 630,
|
||||
backgroundColor ? : string = "#fff"
|
||||
fonts ? : {
|
||||
name: string,
|
||||
data: ArrayBuffer,
|
||||
@@ -170,7 +176,7 @@ This project will not be possible without the following projects:
|
||||
|
||||
- [Satori & @vercel/og](https://github.com/vercel/satori)
|
||||
- [Noto by Google Fonts](https://fonts.google.com/noto)
|
||||
- [Resvg.js](https://github.com/yisibl/resvg-js)
|
||||
- [svg2png-wasm](https://github.com/ssssota/svg2png-wasm)
|
||||
|
||||
## Authors
|
||||
|
||||
|
||||
10
package.json
10
package.json
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ethercorps/sveltekit-og",
|
||||
"version": "2.0.0@beta.0",
|
||||
"version": "2.0.0",
|
||||
"private": false,
|
||||
"scripts": {
|
||||
"dev": "vite dev --host",
|
||||
@@ -31,18 +31,18 @@
|
||||
"prettier": "^2.8.8",
|
||||
"prettier-plugin-svelte": "^2.10.1",
|
||||
"prismjs": "^1.29.0",
|
||||
"svelte": "^3.59.1",
|
||||
"svelte-check": "^2.10.3",
|
||||
"svelte-preprocess": "^4.10.7",
|
||||
"tailwindcss": "^3.3.2",
|
||||
"tslib": "^2.5.3",
|
||||
"typescript": "^4.9.5",
|
||||
"vite": "^4.3.9",
|
||||
"svelte": "^3.59.1"
|
||||
"vite": "^4.3.9"
|
||||
},
|
||||
"type": "module",
|
||||
"dependencies": {
|
||||
"svg2png-wasm": "^1.4.0",
|
||||
"satori": "^0.10.1"
|
||||
"satori": "^0.10.1",
|
||||
"svg2png-wasm": "^1.4.0"
|
||||
},
|
||||
"keywords": [
|
||||
"open graph image",
|
||||
|
||||
Reference in New Issue
Block a user