我工作的一个多语言的网站,我准备使用JSON-LD Schema.org标记。重要细节:本网站使用语言的子目录。让我们考虑两种语言:Schema.org的网站,多国语言:灌装公司和网站的事情吧
- 英语:
https://www.example.com/
- 法国:
https://www.example.com/fr/
我想把Corporation
和WebSite
东西上所有本地化HP。一切顺利但@id
,url
和inLanguage
属性:我不太知道我应该填什么。
对于Corporation
,我想我猜中了:我要在所有页面的默认URL中使用,并在其基础我@id
:
{
"@context": "http://schema.org",
"@type": "Corporation",
"@id": "https://www.example.com/#organization",
"name": "Example",
"url": "https://www.example.com/",
...
但是,什么是最好的移动性能WebSite
,在我的法国HP上? 从技术上讲,/fr/
子文件夹是example.com/
域的一部分。但随后,@id
,inLanguage
和url
没有告诉我的网站也可用于讲法语的人。
{
"@context": "http://schema.org",
"@type": "WebSite",
"@id": "https://www.example.com/#website", // should this be "https://www.example.com/fr/#website" ?
"name": "Example",
"url": "https://www.example.com/", // should this be "https://www.example.com/fr/" ?
"inLanguage": "en", // should this be "fr" ?
...
我搜索了很多关于这方面的信息,并没有在这个特定的问题上找到任何东西。 有没有人有这方面的经验?
谢谢您的回答!感谢您的帮助,我学到了非常有趣的东西。正如你写的,@id非常强大。 –