Route Rules
Learn how to use route rules to customise your OG Image.
In some cases, you'll want to apply OG Image setting for a subset of pages.
You can handle this even easier with the route rule merging.
This lets you provide a
For example, this documentation website uses it to set the
nuxt.config.ts
export default defineNuxtConfig({
routeRules: {
'/og-image/**': {
ogImage: {
props: { icon: 'carbon:image-search' }
}
}
}
})
Did this page help you?