Meta tags show in browser but don't work
See original GitHub issueEnvironment
- Operating System:
Darwin
- Node Version:
v16.15.1
- Nuxt Version:
3.0.0-rc.9
- Nitro Version:
0.5.1
- Package Manager:
yarn@1.22.19
- Builder:
vite
- User Config:
ssr
,target
,css
,modules
,runtimeConfig
,sanity
,meta
,sitemap
- Runtime Modules:
@nuxtjs/tailwindcss@5.3.3
,@nuxtjs/google-gtag@1.0.4
,@funken-studio/sitemap-nuxt-3@3.2.0
- Build Modules:
-
Reproduction
https://alicia-chamaille-portfolio.pages.dev/
Describe the bug
I have added meta tags to the nuxt.config.ts.
These data can be see when viewing the head from the elements, but when trying to validate they are working, I get errors say no description etc. These are the sites I’m trying to test on https://cards-dev.twitter.com/validator https://rushax.com/tools/meta-description-checker/ https://totheweb.com/learning_center/tool-test-google-title-meta-description-lengths/ https://www.heymeta.com/url/www.thaliarabie.com/

No one of them work, any help would be greatly appreciated.
I’ve done the exact same approach on nuxt v2 and it works
Additional context
No response
Logs
No response
Issue Analytics
- State:
- Created a year ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
Some browsers not recognizing meta tags added via Javascript
One possible explanation is that the other browsers does not read the meta tags after the page is loaded, or does not read...
Read more >Meta Tags does not appear in View Source Code - GitHub
I have my _document.js where I tried adding the meta tags and that started working. Here is my code-. import React from 'react'...
Read more >Why don't meta tags require a closing tag? - Treehouse
Open a workspace where you have (or add) a closing meta tag, and then open the Inspector in the preview page. In the...
Read more >Viewport meta tag - HTML: HyperText Markup Language | MDN
This article describes how to use the "viewport" <meta> tag to control the viewport's size and shape. Background. The browser's viewport is the ......
Read more >Meta Tags: The Definitive Guide to Meta-Data for SEO (2021)
Learn exactly what meta tags are, plus tips, tricks, and best practices for the ten most important meta tags for SEO. Read now!...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks I might try the nitro method.
I did some further research and I think bridge is causing the issue. I saw some other tickets that matched my issues.
So I rather going to go back to Nuxt 2 with composition api and leave bridge out. This method has worked for me in the past.
Appreciate all the help 🙂
You are welcome. You should check out the issue I linked earlier. It may have an example of a workaround. But if not, and you have an operational requirement not to have SSR, then you can inject chunks of html into the head via a nitro plugin.
A final note. I’ve come across a lot of people who have the idea that they need to disable
ssr
in order to statically generate their sites. That may not be you, but just in case, it is absolutely not true and in fact it’s almost the reverse situation.