如何在下一个js中使用NextHead并设置打开图形标记。我正在从详细信息页面传递道具,但是它没有出现在源代码中。
<NextHead>
<title>{title}</title>
<meta property="og:type" content="website"/>
<meta name="description" content={description}/>
<meta property="og:title" content={title}/>
<meta name="description" content={description}/>
<meta name="keywords" content={keyword}/>
<meta property="og:url" content={url}/>
<meta property="og:description" content={description}/>
<meta property="og:image" content={image}/>
</NextHead>
问题之一是Next.js Head组件要求所有元标记都具有name属性。我没有在任何地方看到此文档,我相信这就是为什么例如
from the original question did not end up in the DOM. It took me quite some time to understand this gotcha, so I hope this helps someone.