Next.js meta tag implementation
Answered
Razorbill posted this in #help-forum
RazorbillOP
I am using next.js to build shopping website.
when user visit the product page, it should update the meta title and description with product info, but it's not updating in url preview
I set title and description in root layout and I have to change this in product detail page
the product title and description should be fetched from the backend using product id in url parameters
Anyone can help me with this problem?
when user visit the product page, it should update the meta title and description with product info, but it's not updating in url preview
I set title and description in root layout and I have to change this in product detail page
the product title and description should be fetched from the backend using product id in url parameters
Anyone can help me with this problem?
Answered by B33fb0n3
You can generate them by using the function:
https://nextjs.org/docs/app/api-reference/functions/generate-metadata
https://nextjs.org/docs/app/api-reference/functions/generate-metadata
4 Replies
You can generate them by using the function:
https://nextjs.org/docs/app/api-reference/functions/generate-metadata
https://nextjs.org/docs/app/api-reference/functions/generate-metadata
Answer
@Razorbill Did that help you?
RazorbillOP
It helped me a lot
thanks