'Vue meta Alpha8 doens't generate meta tags properly
Hi I'm using Vue3 with vue-meta: ^3.0.0-alpha.8. I'm trying to setup my project in order to set dynamically the meta-tags.
Here my code on App.vue:
import constants from './constants'
export default {
data() {
return {
constants: constants
}
}
},
setup() {
useMeta({
htmlAttrs: {
lang: constants.meta.language,
},
description: constants.main.description,
meta: [
{
name: 'author',
content: constants.meta.author
},
{
name: 'keywords',
content: constants.meta.keywords
},
{
name: 'robots',
content: constants.meta.robots
}
]
}
}
}
htmlAttrs and description works fine generating: <html lang="en" ... and <meta name="description" content="My description">
The other tags, on the other hand, are generated incorrectly:
<meta name="meta" content="my author string">
<meta name="meta" content="my keywords string">
<meta name="meta" content="my robots string">
Why it is generating <meta name="meta" .. instead of <meta name="MY PARAMETER NAME" ..?
I just can't figure it out.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
