Incorrect missing lang tag in case of setting up in nuxt.config.ts
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 3.3k
- Forks
- 214
- Avg merge
- 13h 22m
- Merged PRs (30d)
- 18
Description
🐛 The bug
In the menu Open Graph under the tab Missing Tags.
It displays incorrectly as missing lang tag if lang html attribute is set by nuxt.config.ts like:
// nuxt.config.ts
app: {
head: {
// ..
htmlAttrs: {
lang: 'en',
},
}
}
Open Graph / Missing Tags / lang (location in dev tools)
"⚠️lang
The primary language of the page to help search engines and browsers understand the content."
🛠️ To reproduce
https://stackblitz.com/edit/nuxt-starter-nvb8xh?file=nuxt.config.ts
🌈 Expected behavior
It should not de displayed as missing lang tag in this case as far as I know.
"⚠️lang
The primary language of the page to help search engines and browsers understand the content."
ℹ️ Additional context
It works fine when I use useHead. 😊
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the StackBlitz reproduction and inspect the Open Graph Missing Tags check for the lang attribute. Compare how it detects lang from nuxt.config.ts app.head.htmlAttrs with the existing useHead case; done means the configured lang is no longer reported as missing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nuxt, typescript
- Domain
- developer-experience, devtools, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100