v2 to v3
Playground
You must access the playground through Nuxt DevTools, the
OG Image URL
If you were referencing an OG Image URL, you will need to update it to use the new
Nuxt Config
Remove the following keys from your Nuxt config:
playground - If you have Nuxt DevTools enabled then the playground will always be enabledhost - You must migrate to using Nuxt Site ConfigsiteUrl - You must migrate to using Nuxt Site ConfigruntimeBrowser ,runtimeSatori - These are now handled bycompatibility . If you intend to use Chromium at runtime please see the Chromium docs for more information.
Nuxt Hooks
Remove any usages of the
If you were using this hook and have a use case for it, please open an issue.
If you were using
Caching
You will need to delete all old cache keys:
Please see the caching docs for details on using the new
Default Template
If you were referencing the default template as
// v3
defineOgImage({
component: 'Fallback',
// props ...
})
// v3
defineOgImageComponent('NuxtSeo', {
// props
})
Components
It's now recommended to use the new
The following composables have been removed:
OgImageStatic OgImageDynamic OgImageCached OgImageWithoutCache
If you need to using components then do a search for these components and replace any instances or variations with
<template>
<OgImageStatic :title="title" :description="description" />
</template>
// v3
defineOgImageComponent('NuxtSeo', {
title: '',
description: '',
})
<template>
<OgImage :title="title" :description="description" />
</template>
If you're using components with Nuxt Content, you will now need to manually make them global.
export default defineNuxtConfig({
ogImage: {
componentOptions: {
global: true,
},
},
})
Composables
The following composables were removed:
defineOgImageStatic defineOgImageDynamic defineOgImageCached defineOgImageWithoutCache
Do a global search for these removed composables as well as
The props work a little bit differently, you will need to pass them in explicitly as a second argument.
If you were using the default template previously, you should use the
// v2
defineOgImage({
title: String,
description: String,
})
// v3
defineOgImageComponent('NuxtSeo', {
title: String,
description: String,
})