website link isn't showing metadata when pasting it in discord?
Answered
futuredevengineer posted this in #help-forum
<head>
<meta name="twitter:card" content='summary'/>
<meta name="twitter:title" content="Welcome to my Portfolio"/>
<meta name='twtter:description' content='A Passionate Software Engineer'/>
<meta name='twitter:image' content='./mainimg.png' />
<meta name='twitter:author' content='Name here'/>
</head>
i put this
layout.tsx
, however I am wondering what the difference between Next's Head and native head?Answered by futuredevengineer
Now i am trying paste the meta tags into
page.tsx
, considering it is server component, let's see...12 Replies
Now i am trying paste the meta tags into
page.tsx
, considering it is server component, let's see...Answer
it worked.
consider using the
metadata
API insteadHow does that work with Twitter meta data? I want to create Twitter card
i tried reading the docs, but i couldn't put my hand on "twitter image" page, it seem to be solely for images, I still don't know exactly how to setup twitter metadata in next? like what about title, description, creator....etc
try creating
export const metadata: Metadata = { ... }
and then use the intellisense
{
twitter: ...
}
twitter: ...
}
oh, so it is created using the same
metadata
objectok i see i see