-
Notifications
You must be signed in to change notification settings - Fork 462
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose the head SEO function to be used in layouts #154
Expose the head SEO function to be used in layouts #154
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.$nuxtI18nSeo
on components.This allows to disable seo head mixin on all components (by setting
seo: false
in 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: true
in the configuration.Resolves: #144