Sep 3, 202410:17 AM - edited Sep 3, 202410:19 AM
Member
Add dynamic meta tag depend on ?id with React CMS
Hi, my site has a list of posts with url /post?id=<id>. The posts are stored on a backend outside hubspot. I need to add meta tags with relevant information about the post based on the ID. I am using https://github.hubspot.com/cms-react/ and everything works fine except one thing. When I use getServerSideProps to get the post data and useInlineHeadAsset() to add a meta tag, the meta tag is added in the form of
Hi @VShvets! Welcome to the Community-- happy to have you here 😊
I understand you are looking for a way to dynamically set a meta tag on your blog pages based on the post ID. Thank you for including your code. I'd like to invite some of our experts to see if they have come across this type of request! @Kevin-C, @albertsg, @Indra do any of you have insight into retrieving the post data and dynamically adding a meta tag? Thanks in advance!
Best, Kennedy
Did you know that the Community is available in other languages? Join regional conversations by changing your language settings !