Updated Readme

This commit is contained in:
Shivam Meena
2023-06-10 10:41:54 +05:30
parent 97d7c42727
commit d23469aa45
2 changed files with 15 additions and 9 deletions

View File

@@ -4,8 +4,13 @@ Dynamically generate Open Graph images from an HTML+CSS template or Svelte compo
## Installation ## Installation
```sh ```bash
npm install -D @ethercorps/sveltekit-og 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 ## Usage
@@ -95,7 +100,8 @@ ImageResponse(
element : string, element : string,
options : { options : {
width ? : number = 1200 width ? : number = 1200
height ? : number = 630 height ? : number = 630,
backgroundColor ? : string = "#fff"
fonts ? : { fonts ? : {
name: string, name: string,
data: ArrayBuffer, data: ArrayBuffer,
@@ -170,7 +176,7 @@ This project will not be possible without the following projects:
- [Satori & @vercel/og](https://github.com/vercel/satori) - [Satori & @vercel/og](https://github.com/vercel/satori)
- [Noto by Google Fonts](https://fonts.google.com/noto) - [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 ## Authors

View File

@@ -1,6 +1,6 @@
{ {
"name": "@ethercorps/sveltekit-og", "name": "@ethercorps/sveltekit-og",
"version": "2.0.0@beta.0", "version": "2.0.0",
"private": false, "private": false,
"scripts": { "scripts": {
"dev": "vite dev --host", "dev": "vite dev --host",
@@ -31,18 +31,18 @@
"prettier": "^2.8.8", "prettier": "^2.8.8",
"prettier-plugin-svelte": "^2.10.1", "prettier-plugin-svelte": "^2.10.1",
"prismjs": "^1.29.0", "prismjs": "^1.29.0",
"svelte": "^3.59.1",
"svelte-check": "^2.10.3", "svelte-check": "^2.10.3",
"svelte-preprocess": "^4.10.7", "svelte-preprocess": "^4.10.7",
"tailwindcss": "^3.3.2", "tailwindcss": "^3.3.2",
"tslib": "^2.5.3", "tslib": "^2.5.3",
"typescript": "^4.9.5", "typescript": "^4.9.5",
"vite": "^4.3.9", "vite": "^4.3.9"
"svelte": "^3.59.1"
}, },
"type": "module", "type": "module",
"dependencies": { "dependencies": {
"svg2png-wasm": "^1.4.0", "satori": "^0.10.1",
"satori": "^0.10.1" "svg2png-wasm": "^1.4.0"
}, },
"keywords": [ "keywords": [
"open graph image", "open graph image",