-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
useSeoMeta
not working together with ClientOnly
#28229
Comments
It's no surprise that if you don't render a component on the server, that it won't run the setup function or add the meta tags to the rendered HTML, which means that the crawler won't see them. Instead you can move the code outside of the client only portion, such as inside app.vue |
Oh, yea. Now I am getting it. I am adding meta tags on page component level, so it cannot work when I wrap Sorry for opening unnecessary issue 😞 |
No worries at all! |
Environment
Reproduction
I am observing the behaviour in my project https://github.com/AloisSeckar/WBSC-Scoring deployed at Netlify https://wbsc-scoring-dev.netlify.app/
Describe the bug
I am using
useSeoMeta
wrapped in a composable to include meta tags to my project. It works fine for fully SSR pages, but when I tried to have part of my page<ClientOnly>
because of hydration mismatch issues related toi18n
module, meta tags were not visible for Facebook crawler at all.This commit commenting out the
<ClientOnly>
component made it working again.Maybe it is intended behaviour, but if so, then I don't understand why? A part of the site is being rendered on server, so it should be enriched with meta tags via
useSeoMeta
, or?Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: