The simplest way to handle SEO is by putting the results of np.getHeadHtml()
directly into the tag of your document:
<script>
var headHtml = await pn.getHeadHtml();
</script>
<head>
{headHtml}
</head>
That's it. You're good.
Alternatively, call pn.getHead()
for title, description and imgUrl information to roll your own:
<script>
var head = await pn.getHead();
</script>
<head>
<title>{head.title}</title>
<meta name="description" content={head.description}>
... etc ...
</head>