问题
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