Skip to content

Commit cddb782

Browse files
committed
doc: sync
1 parent 57ac264 commit cddb782

File tree

13 files changed

+62
-60
lines changed

13 files changed

+62
-60
lines changed

docs/content/0.getting-started/3.troubleshooting.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ to reproduce the issue.
4040
- You can't use anything that will require a fetch request to a different server (e.g. Google Fonts, custom Emojis, images, etc).
4141
- The `browser` renderer is not supported
4242
- `sharp` is not supported, so you can't use JPEGs
43-
- `inline-css` is not supported, so you can't `<style>`{lang="html"} blocks
43+
- `<style>`{lang="html"} blocks may have limited support
4444

4545
## Debugging Tools
4646

docs/content/0.getting-started/5.getting-familiar-with-nuxt-og-image.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ Feel free to pass in any props you like, but for this example we're going to use
5454
defineOgImage('NuxtSeo.takumi', {
5555
title: 'Hello OG Image',
5656
description: 'Look at me in dark mode',
57-
theme: '#ff0000',
5857
colorMode: 'dark',
5958
})
6059
</script>
@@ -77,10 +76,10 @@ Community templates are for development only. Before deploying, eject them with
7776

7877
```vue [pages/index.vue]
7978
<script lang="ts" setup>
80-
defineOgImage('Nuxt.takumi', {
81-
headline: 'Greetings',
79+
defineOgImage('NuxtSeo.takumi', {
8280
title: 'Hello OG Image',
83-
description: 'Look at me using the Nuxt template',
81+
description: 'Look at me using the NuxtSeo template',
82+
isPro: true,
8483
})
8584
</script>
8685
```
@@ -107,7 +106,7 @@ Or copy and paste the template manually from the `Community` tab in Nuxt DevTool
107106

108107
### 1. Create your template component
109108

110-
We're going to start with the [SimpleBlog](https://github.com/nuxt-modules/og-image/blob/main/src/runtime/app/components/Templates/Community/SimpleBlog.vue) template as a quick way to get started.
109+
We're going to start with the [SimpleBlog](https://github.com/nuxt-modules/og-image/blob/main/src/runtime/app/components/Templates/Community/SimpleBlog.satori.vue) template as a quick way to get started.
111110

112111
Let's copy this template into our project at `./components/OgImage/BlogPost.takumi.vue` and remove some of the boilerplate.
113112

docs/content/2.renderers/0.index.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ All renderers share core features: [Tailwind CSS](https://tailwindcss.com) suppo
1515
|---------|--------|--------|----------|
1616
| | **Recommended** | | |
1717
| **Speed** | Fastest (2-10x) | Fast | Slow |
18-
| **Edge Runtime** ||| |
18+
| **Edge Runtime** ||| [Cloudflare](/docs/og-image/renderers/browser#cloudflare-browser-rendering) only |
1919
| **CSS Support** | Complete | Partial | Full |
2020
| **Gradients** ||||
2121
| **Opacity** ||||
@@ -39,8 +39,8 @@ All renderers share core features: [Tailwind CSS](https://tailwindcss.com) suppo
3939
| Vercel Edge | ✅ Wasm | ✅ Wasm ||
4040
| [Netlify](https://netlify.com) ||||
4141
| Netlify Edge | ✅ Wasm | ✅ Wasm ||
42-
| Cloudflare Workers | ✅ Wasm | ✅ Wasm | |
43-
| Cloudflare Pages | ✅ Wasm | ✅ Wasm | |
42+
| Cloudflare Workers | ✅ Wasm | ✅ Wasm | [Browser Rendering](/docs/og-image/renderers/browser#cloudflare-browser-rendering) |
43+
| Cloudflare Pages | ✅ Wasm | ✅ Wasm | [Browser Rendering](/docs/og-image/renderers/browser#cloudflare-browser-rendering) |
4444
| [StackBlitz](https://stackblitz.com) | ✅ Wasm | ✅ Wasm ||
4545

4646
### Binding Types
@@ -58,13 +58,14 @@ Each renderer can use different bindings depending on the environment:
5858
- Browser unavailable (binary too large)
5959
- Sharp unavailable (post-install script issues)
6060

61-
**Vercel Edge, Netlify Edge, Cloudflare Pages**
61+
**Vercel Edge, Netlify Edge**
6262
- Satori and Takumi use Wasm automatically
6363
- Browser and Sharp unavailable
6464

65-
**Cloudflare Workers**
65+
**Cloudflare Workers/Pages**
6666
- Satori and Takumi use Wasm automatically
67-
- Browser and Sharp unavailable
67+
- Browser available via [Cloudflare Browser Rendering](/docs/og-image/renderers/browser#cloudflare-browser-rendering) binding
68+
- Sharp unavailable
6869

6970
### Overriding Compatibility
7071

@@ -128,7 +129,7 @@ components/OgImage/MyTemplate.takumi.vue
128129

129130
### Use Satori
130131

131-
Satori works without installing extra dependencies and has good CSS support for most templates:
132+
Satori requires `satori` and `@resvg/resvg-js` (or `@resvg/resvg-wasm` for edge runtimes) as peer dependencies. It has good CSS support for most templates:
132133

133134
```bash
134135
components/OgImage/MyTemplate.satori.vue

docs/content/2.renderers/2.satori.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Satori Renderer
33
description: Learn how to use the Satori renderer.
44
---
55

6-
[Satori](https://github.com/vercel/satori) converts Vue components to SVG, then rasterizes to PNG. It works without extra dependencies but has more CSS limitations than [Takumi](/docs/og-image/renderers/takumi).
6+
[Satori](https://github.com/vercel/satori) converts Vue components to SVG, then rasterizes to PNG via [resvg](https://github.com/yisibl/resvg-js). It has more CSS limitations than [Takumi](/docs/og-image/renderers/takumi).
77

88
::note
99
For new projects, we recommend [Takumi](/docs/og-image/renderers/takumi) - it's 2-10x faster with more complete CSS support.
@@ -54,7 +54,7 @@ The module automatically detects the renderer from the filename - zero-config.
5454
- Fast rendering
5555
- Works on all environments including edge runtimes
5656
- Good CSS support (flexbox, fonts, colors, gradients)
57-
- 6 emoji families supported
57+
- 11 emoji families supported
5858
- Google Fonts integration
5959

6060
## Cons

docs/content/3.guides/3.jpegs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ The module supports rendering JPEGs instead of PNGs, but it requires Sharp. The
1111

1212
If you're prerendering your images or using a Node based environment, you can enable Sharp to render JPEGs.
1313

14-
Chromium rendering uses `jpeg` images by default.
14+
Browser rendering uses `jpeg` images by default.
1515

1616
## Setup
1717

docs/content/3.guides/5.custom-fonts.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,12 @@ export default defineNuxtConfig({
7777

7878
Different renderers support different font formats:
7979

80-
| Format | Satori | Takumi | Chromium |
81-
|--------|--------|--------|----------|
80+
| Format | Satori | Takumi | Browser |
81+
|--------|--------|--------|---------|
8282
| woff2 ||||
83-
| woff || ||
83+
| woff || ||
8484
| ttf ||||
85-
| otf || ||
85+
| otf || ||
8686

8787
::note
8888
When using Google Fonts or other providers, `@nuxt/fonts` automatically fetches the correct format. Format compatibility only matters for local fonts.

docs/content/3.guides/8.community-templates.md

Lines changed: 4 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ The `NuxtSeo` template is the default one provided for you. It comes with a numb
3737
to let you customise it however you like.
3838

3939
Like all Community templates, it's recommended to copy+paste it into your project if you want to customise it. You can find
40-
the source on [GitHub](https://github.com/nuxt-modules/og-image/blob/main/src/runtime/app/components/Templates/Community/Nuxt.vue).
40+
the source on [GitHub](https://github.com/nuxt-modules/og-image/tree/main/src/runtime/app/components/Templates/Community) (available as both `NuxtSeo.satori.vue` and `NuxtSeo.takumi.vue`).
4141

4242
## Props
4343

@@ -55,36 +55,12 @@ The title of the page. This serves as the main heading.
5555

5656
The description of the page. This serves as the subheading.
5757

58-
### `icon`
58+
### `isPro`
5959

60-
**Type:** `string` | `boolean`
60+
**Type:** `boolean`
6161
**Default:** `false`
6262

63-
The icon of the page. This serves as the main image. Requires Nuxt Icon installation.
64-
65-
### `siteName`
66-
67-
**Type:** `string`
68-
**Default:** Site Name from [Nuxt Site Config](/docs/site-config/guides/how-it-works)
69-
70-
Sets the bottom centered text of the template.
71-
72-
### `siteLogo`
73-
74-
**Type:** `string`
75-
76-
Replaces the site name and the Nuxt SEO logo with a custom image.
77-
78-
See the [Icons and Images](/docs/og-image/guides/icons-and-images) guide for more information.
79-
80-
### `theme`
81-
82-
**Type:** `string`
83-
**Default:** `#00dc82`
84-
85-
Changes the theme of the template. You should either provide a hexadecimal color or a valid rgb.
86-
87-
For example: `#d946ef`
63+
Changes the template to use a purple/violet color scheme instead of green. Useful for distinguishing Pro-tier content.
8864

8965
### `colorMode`
9066

docs/content/4.api/0.define-og-image-component.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Returns an array of generated image URLs.
4141
defineOgImageComponent(
4242
'MyCustomComponent',
4343
{ title: 'Welcome to my site!' },
44-
{ fonts: ['CustomFont:400'] }
44+
{ cacheMaxAgeSeconds: 3600 }
4545
)
4646
```
4747

docs/content/4.api/0.define-og-image-screenshot.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ The `defineOgImageScreenshot()`{lang="ts"} composable allows you to take a scree
1010
This requires the `browser` renderer, check the [Browser](/docs/og-image/renderers/browser) guide for more information.
1111

1212
::warning
13-
Screenshots require the Browser renderer which is **not available on serverless platforms** (Vercel, [Netlify](https://netlify.com), AWS Lambda) due to binary size limits. You must either [prerender](/docs/og-image/guides/zero-runtime) your images at build time or use [Satori](/docs/og-image/renderers/satori) / [Takumi](/docs/og-image/renderers/takumi) with a custom component instead.
13+
Screenshots require the Browser renderer which is **not available on most serverless platforms** (Vercel, [Netlify](https://netlify.com), AWS Lambda) due to binary size limits. [Cloudflare Workers/Pages](/docs/og-image/renderers/browser#cloudflare-browser-rendering) are an exception via Browser Rendering bindings. Otherwise, you must either [prerender](/docs/og-image/guides/zero-runtime) your images at build time or use [Satori](/docs/og-image/renderers/satori) / [Takumi](/docs/og-image/renderers/takumi) with a custom component instead.
1414
::
1515

1616
## Props

docs/content/4.api/0.define-og-image.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ defineOgImage(component, props, options)
1717

1818
- `component`: The component name (e.g., `'NuxtSeo'`, `'MyTemplate'`)
1919
- `props`: Props to pass to the component
20-
- `options`: Additional options like `fonts`, `cacheMaxAgeSeconds`, etc.
20+
- `options`: Additional options like `cacheMaxAgeSeconds`, `extension`, etc.
2121

2222
```ts
2323
// Simple
@@ -54,7 +54,7 @@ The alt text of the image. It's recommended to always provide this for accessibi
5454

5555
### `extension`
5656

57-
- Type: `'png' | 'jpeg' | 'jpg' | 'webp'`{lang="ts"}
57+
- Type: `'png' | 'jpeg' | 'jpg' | 'webp' | 'svg' | 'html'`{lang="ts"}
5858
- Default: `'png'`{lang="ts"}
5959

6060
The extension to use when generating the image.
@@ -63,10 +63,10 @@ See the [JPEGs](/docs/og-image/guides/jpegs) guide for using JPEGs.
6363

6464
### `emojis`
6565

66-
- Type: `'twemoji' | 'noto' | 'fluent-emoji' | 'fluent-emoji-flat' | 'fluent-emoji-high-contrast' | 'noto-v1' | 'emojione' | 'emojione-monotone' | 'emojione-v1' | 'streamline-emojis' | 'openmoji'`{lang="ts"}
66+
- Type: `'twemoji' | 'noto' | 'fluent-emoji' | 'fluent-emoji-flat' | 'fluent-emoji-high-contrast' | 'noto-v1' | 'emojione' | 'emojione-monotone' | 'emojione-v1' | 'streamline-emojis' | 'openmoji' | false`{lang="ts"}
6767
- Default: `'noto'`{lang="ts"}
6868

69-
The emoji set to use when generating the image.
69+
The emoji set to use when generating the image. Set to `false` to disable emoji rendering.
7070

7171
### `html`
7272

@@ -132,11 +132,14 @@ Options to pass to Sharp when generating images. See the [Sharp docs](https://sh
132132

133133
Options to pass to the browser when generating screenshots. See the [defineOgImageScreenshot](/docs/og-image/api/define-og-image-screenshot) documentation for more details.
134134

135-
### `fonts`
135+
### `fonts` :deprecated
136136

137-
- Type: `InputFontConfig[]`{lang="ts"}
138137
- Default: `[]`{lang="ts"}
139138

139+
::callout{type="warning"}
140+
Deprecated. Configure fonts via [`@nuxt/fonts`](https://fonts.nuxt.com) instead. The module automatically detects and uses fonts from `@nuxt/fonts`.
141+
::
142+
140143
Extra fonts to use when rendering this OG image. See the [Custom Fonts](/docs/og-image/guides/custom-fonts) documentation for more details.
141144

142145
### `component`

0 commit comments

Comments
 (0)