我在自己的网站上实现了Google的Sitelinks Search Box。运行得很好。但是今天我再次对Google Structured Data Testing Tool轻笑,出了点问题。现在,我遇到了以下错误:
我的实现是:
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "WebSite",
"url": "https://www.saatler.com/",
"potentialAction": {
"@type": "SearchAction",
"target": "https://www.saatler.com/arama?ara={search_term_string}",
"query-input":"required name=search_term_string"
}
}
</script>
当我检查the JSON-LD playground上的JSON时,一切看起来都很好。我没有更改网站上的任何内容。 Google在这个问题上错了吗?还是Schema.org结构发生了变化?我该怎么做才能解决这两个问题?
最佳答案
我注意到,即使在线documentation上的示例也收到与您收到的相同的错误。当我改变
"@context": "http://schema.org"
至
"@context": "http://schema.org/true"
错误消失了。希望这可以帮助。
<script type="application/ld+json">
{
"@context": "http://schema.org/true",
"@type": "WebSite",
"url": "https://www.saatler.com/",
"potentialAction": {
"@type": "SearchAction",
"target": "https://www.saatler.com/arama?ara={search_term_string}",
"query-input":"required name=search_term_string"
}
}
</script>
关于schema.org - 网站连结搜寻框JSON-LD在Google结构化资料测试工具上显示错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30780247/