Reputation: 4873
I want to integrate rank math SEO tool API support for SEO.
Following this tutorial, returns full HTML ready head with good metadata and others, but the problem is, how to render it into NextJS 13 head area?
Nextjs 13 not working more with the Head component/tag.
How do you even render those tags as HTML?
Have a nice day.
Upvotes: 0
Views: 786
Reputation: 57
You can use this package to parse string into html.
Package: html-react-parser
import parse from "html-react-parser";
function MyPage() {
return (
<div>
<Head>
<title>My Title</title>
<meta name="description" content="My description" />
{parse(post.head)}
</Head>
<p>Hello World!</p>
</div>
);
}
Upvotes: 1