Expose the head SEO function to be used in layouts#154
Expose the head SEO function to be used in layouts#154TheAlexLichter merged 8 commits intonuxt-modules:masterfrom
Conversation
Sync with base project
|
Thanks @adrienbaron ! |
|
Happy we found a solution 🙊 (Also one that can be default at the next major version) |
|
@adrienbaron @manniL Last commit on |
|
@kevinmarrec Should be just the vue-ssr id( |
|
@kevinmarrec fixed |
harmnot
left a comment
There was a problem hiding this comment.
why $nuxtI18nSeo is not a function ??
|
@harmnot There hasn't been a release yet |
|
I was asking this https://cmty.app/nuxt/nuxt-i18n/issues/c176 |
|
then, I try to find out, and follow the instruction https://github.com/nuxt-community/nuxt-i18n/blob/master/docs/seo.md here and after that , show the $nuxtI18nSeo is not a function |
|
Sorry for the delay, this wasn't released until recently in version |
This PR exposes the SEO head hook function as
this.$nuxtI18nSeoon components.This allows to disable seo head mixin on all components (by setting
seo: falsein nuxt i18n options).Then it's possible to do this in your app layout (or wherever):
This greatly improves performance as SEO links are not recomputed for every components but only for the layout itself.
This changes is not breaking as the default global registration with the same behaviour remains if
seo: truein the configuration.Resolves: #144