Should Schema.org dateModified have some default value if not available?

*爱你&永不变心* 提交于 2019-12-02 13:15:27

问题


For Schema.org Article I get an error in https://developers.google.com/structured-data/testing-tool/ for dateModified:

The dateModified field is recommended. Please provide a value if available.

Do I have to write something that I don't have modified date? Because a lot of posts weren't updated. I am unsure if Google is telling me only that it is recommended since there is bright red sign telling me I have an error and this doesn't look promising for my boss who will be checking after me :)


回答1:


The SDTT is not a general Schema.org validator. It primarily checks the Schema.org-based structured data for Google’s own search result features. If Google’s tool reports an error, it doesn’t necessarily mean that your markup is wrong, it often only means that you won’t get a certain Google search result feature.

The vocabulary Schema.org doesn’t require any property. It’s perfectly fine not to provide the dateModified property, and it’s the right thing to do if your publication wasn’t modified yet.

(FWIW, the documentation for Google’s Top Stories with AMP feature says, for publications that were not modified, to omit the property or to set it to the same value as datePublished.)




回答2:


<span itemprop='dateModified'>09/05/2017t02:25</span> or
<meta content='09/05/2017t02:25' itemprop='dateModified'/>
<div itemprop='dateModified'>29.05.2017T02:30</div>


来源:https://stackoverflow.com/questions/36678778/should-schema-org-datemodified-have-some-default-value-if-not-available

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!