Need help for metadata
Answered
Western harvester ant posted this in #help-forum
Western harvester antOP
Heyo!
I understand how this works: https://nextjs-faq.com/metadata-client-components
However, I would like to change some other meta things, like description, how do I do this? :D
I understand how this works: https://nextjs-faq.com/metadata-client-components
However, I would like to change some other meta things, like description, how do I do this? :D
Answered by riský
you would need to do fetching on server instead and use a server component to make use of it
9 Replies
so, are you doing server component importing client component, or dynamic client component option (title in body)
as if second option, it is useless to add that metadata because it would only show up when using javascript (something that google doesn't do iirc)
Western harvester antOP
This is my current try of the metadata:
return (
<>
<title>{productsData.title}</title>
<h1>Next.js + Domain</h1>
<p>
This is an example of how to use Domain with Next.js. Please see the
README for more information on how to use this example.
</p>
</>
);the title works
yeah, if you do it that way, you can't make use of seo things...
Western harvester antOP
How exactly do I change the SEO metadata dynamically then?
you would need to do fetching on server instead and use a server component to make use of it
Answer
Western harvester antOP
hmm
alright