nuxt / vue-meta

Manage HTML metadata in Vue.js components with SSR support
https://vue-meta.nuxtjs.org
Other
4.08k stars 247 forks source link

How to add twitter:card to the meta using vue-meta #817

Open moda20 opened 5 months ago

moda20 commented 5 months ago

i am trying to add a simple twitter card and title as meta tags to my vue3 pages, the tags are different between the pages, i can't seem to find any documentation that can show exactly how to do that, everything is super complicated.

i tried adding meta attribute with the desired attrobutes to the vue-router routes and return it in metaInfo function but that didn't work.

amshiro commented 4 months ago

Hi, bro, have you solved this problem?

moda20 commented 4 months ago

@amshiro no, i dropped the package and added the metatags to the index.html directly. there is head.js lib that is a better alternative for this one

amshiro commented 4 months ago

@amshiro no, i dropped the package and added the metatags to the index.html directly. there is head.js lib that is a better alternative for this one

I haven't implemented it either. I'll try head.js. Thanks for your suggestion.

amshiro commented 4 months ago

@amshiro no, i dropped the package and added the metatags to the index.html directly. there is head.js lib that is a better alternative for this one

I haven't implemented it either. I'll try head.js. Thanks for your suggestion.

Bro, would you like to share the core usage of head.js? 😊🙏😊

mateusfmello commented 3 months ago

Wouldn't <teleport to="head"> be an alternative to this problem?