Disabling Modules
Since Nuxt SEO installs and enables modules for you, you may run into a situation where you want to disable a module.
The modules have these config keys:
nuxt-og-image-ogImage@nuxtjs/sitemap-sitemap@nuxtjs/robots-robotsnuxt-seo-utils-seonuxt-schema-org-schemaOrgnuxt-link-checker-linkCheckernuxt-ai-ready-aiReadynuxt-skew-protection-skewProtection
You can disable any of these modules by setting the module's enabled value to false in your nuxt.config.ts file.
export default defineNuxtConfig({
ogImage: {
enabled: false
},
sitemap: {
enabled: false
},
robots: {
enabled: false
},
seo: { // seo utils
enabled: false
},
schemaOrg: {
enabled: false
},
linkChecker: {
enabled: false
},
aiReady: {
enabled: false
},
skewProtection: {
enabled: false
}
})You can also set a key to false. false skips the module setup. enabled: false runs a setup that registers nothing. Both remove the module's routes, tags, and output.
nuxt.config.ts
export default defineNuxtConfig({
ogImage: false,
aiReady: false,
skewProtection: false,
})Keep site enabled. The other modules need Site Config.
Disable every bundled module
To keep @nuxtjs/seo in your modules array but install none of its modules, set nuxtseo to false:
export default defineNuxtConfig({
nuxtseo: false,
})nuxtseo: { enabled: false } does the same. A module that you add to modules yourself still installs.
Was this page helpful?
Related
Was this page helpful?