最佳JSON-LD做法:使用多个<script>元素?
我很好奇将JSON-LD应用于schema.org网站的最佳实践。 如果我有一个带有的页面,Article并且我也想WebSite在页面上进行定义,则需要这样: <script type="application/ld+json"> { "@context": "http://schema.org", "@type": "WebSite", "url": "http://www.example.com/", "potentialAction": { "@type": "SearchAction", "target": "http://www.example.com/search?&q={query}", "query-input": "required" } } </script> <!- … --> <script type="application/ld+json"> { "@context": "http://schema.org", "@type": "Article", "author": "John Doe", "interactionCount": [ "UserTweets:1203", "UserComments:78" ], "name": "How to Tie a Reef Knot" } </script> 这是正确还是错误?是否有任何好处或需要将它们合并到相同的脚本或项目数组中?