【发布时间】:2021-10-13 07:00:19
【问题描述】:
我们有兴趣将使用 JSON-LD 和 Schema.org 的自定义脚本添加到我们的 Kentico 门户引擎网站页面 (v11) 的头部。我们希望使用它来协助我们的自定义搜索爬虫对我们的页面进行分类、过滤和索引。
以下是我们的“产品”页面之一上的脚本示例。但是,此脚本将根据页面类型(事件、通用页面等)而有所不同。有没有推荐的方法来自动将此脚本与适当的数据添加到我们的每个页面?我们应该为每种页面类型使用转换吗?还是自定义模块或 webpart?
{
"@context": "http://schema.org/",
"@type": "Product",
"name": "Test Product",
"image": "https://www.test.com/uploads/2010/10/testproduct.png",
"description": "This is a description for the test product.",
"brand": {
"@type": "Thing",
"name": "Test Thing"
}
}
</script>```
【问题讨论】:
标签: search kentico schema.org json-ld