satori 0.0.38 → 0.0.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -4
- package/dist/esm/index.js +8 -7
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index.wasm.js +8 -7
- package/dist/esm/index.wasm.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -3,7 +3,10 @@
|
|
|
3
3
|
**Satori**: Enlightened library to convert HTML and CSS to SVG.
|
|
4
4
|
|
|
5
5
|
> **Note**
|
|
6
|
-
>
|
|
6
|
+
>
|
|
7
|
+
> To use Satori in your project to generate PNG images like Open Graph images and social cards, check out our [announcement](https://vercel.com/blog/introducing-vercel-og-image-generation-fast-dynamic-social-card-images) and [Vercel’s Open Graph Image Generation →](https://vercel.com/docs/concepts/functions/edge-functions/og-image-generation)
|
|
8
|
+
>
|
|
9
|
+
> To use it in Next.js, take a look at the [Next.js Open Graph Image Generation template →](https://vercel.com/templates/next.js/og-image-generation)
|
|
7
10
|
|
|
8
11
|
## Overview
|
|
9
12
|
|
|
@@ -205,7 +208,7 @@ Satori uses the same Flexbox [layout engine](https://yogalayout.com) as React Na
|
|
|
205
208
|
|
|
206
209
|
<tr>
|
|
207
210
|
<td colspan="2"><code>objectFit</code></td>
|
|
208
|
-
<td><code>contain</code>, <code>cover</code>, <code>none</code>, default to <code>
|
|
211
|
+
<td><code>contain</code>, <code>cover</code>, <code>none</code>, default to <code>none</code></td>
|
|
209
212
|
</tr>
|
|
210
213
|
|
|
211
214
|
<tr>
|
|
@@ -301,7 +304,7 @@ Satori supports dynamically loading emoji images (grapheme pictures) and fonts.
|
|
|
301
304
|
await satori(
|
|
302
305
|
<div>👋 你好</div>,
|
|
303
306
|
{
|
|
304
|
-
// `code` will be the detected language code, `emoji` if it's an Emoji, or `
|
|
307
|
+
// `code` will be the detected language code, `emoji` if it's an Emoji, or `unknown` if not able to tell.
|
|
305
308
|
// `segment` will be the content to render.
|
|
306
309
|
loadAdditionalAsset: async (code: string, segment: string) => {
|
|
307
310
|
if (code === 'emoji') {
|
|
@@ -366,7 +369,7 @@ const svg = await satori(
|
|
|
366
369
|
|
|
367
370
|
## Contribute
|
|
368
371
|
|
|
369
|
-
You can use [
|
|
372
|
+
You can use the [Vercel OG Image Playground](https://og-playground.vercel.app/) to test and report bugs of Satori. Please follow our [contribution guidelines](/CONTRIBUTING.md) before opening a Pull Request.
|
|
370
373
|
|
|
371
374
|
<br/>
|
|
372
375
|
|