You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/content/0.getting-started/5.getting-familiar-with-nuxt-og-image.md
+4-5Lines changed: 4 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -54,7 +54,6 @@ Feel free to pass in any props you like, but for this example we're going to use
54
54
defineOgImage('NuxtSeo.takumi', {
55
55
title: 'Hello OG Image',
56
56
description: 'Look at me in dark mode',
57
-
theme: '#ff0000',
58
57
colorMode: 'dark',
59
58
})
60
59
</script>
@@ -77,10 +76,10 @@ Community templates are for development only. Before deploying, eject them with
77
76
78
77
```vue [pages/index.vue]
79
78
<script lang="ts" setup>
80
-
defineOgImage('Nuxt.takumi', {
81
-
headline: 'Greetings',
79
+
defineOgImage('NuxtSeo.takumi', {
82
80
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,
84
83
})
85
84
</script>
86
85
```
@@ -107,7 +106,7 @@ Or copy and paste the template manually from the `Community` tab in Nuxt DevTool
107
106
108
107
### 1. Create your template component
109
108
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.
111
110
112
111
Let's copy this template into our project at `./components/OgImage/BlogPost.takumi.vue` and remove some of the boilerplate.
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:
Copy file name to clipboardExpand all lines: docs/content/2.renderers/2.satori.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: Satori Renderer
3
3
description: Learn how to use the Satori renderer.
4
4
---
5
5
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).
7
7
8
8
::note
9
9
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.
54
54
- Fast rendering
55
55
- Works on all environments including edge runtimes
56
56
- Good CSS support (flexbox, fonts, colors, gradients)
Copy file name to clipboardExpand all lines: docs/content/3.guides/8.community-templates.md
+4-28Lines changed: 4 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,7 +37,7 @@ The `NuxtSeo` template is the default one provided for you. It comes with a numb
37
37
to let you customise it however you like.
38
38
39
39
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`).
41
41
42
42
## Props
43
43
@@ -55,36 +55,12 @@ The title of the page. This serves as the main heading.
55
55
56
56
The description of the page. This serves as the subheading.
57
57
58
-
### `icon`
58
+
### `isPro`
59
59
60
-
**Type:**`string` | `boolean`
60
+
**Type:**`boolean`
61
61
**Default:**`false`
62
62
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.
Copy file name to clipboardExpand all lines: docs/content/4.api/0.define-og-image-screenshot.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ The `defineOgImageScreenshot()`{lang="ts"} composable allows you to take a scree
10
10
This requires the `browser` renderer, check the [Browser](/docs/og-image/renderers/browser) guide for more information.
11
11
12
12
::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.
The emoji set to use when generating the image. Set to `false` to disable emoji rendering.
70
70
71
71
### `html`
72
72
@@ -132,11 +132,14 @@ Options to pass to Sharp when generating images. See the [Sharp docs](https://sh
132
132
133
133
Options to pass to the browser when generating screenshots. See the [defineOgImageScreenshot](/docs/og-image/api/define-og-image-screenshot) documentation for more details.
134
134
135
-
### `fonts`
135
+
### `fonts`:deprecated
136
136
137
-
- Type: `InputFontConfig[]`{lang="ts"}
138
137
- Default: `[]`{lang="ts"}
139
138
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
+
140
143
Extra fonts to use when rendering this OG image. See the [Custom Fonts](/docs/og-image/guides/custom-fonts) documentation for more details.
0 commit comments