如果 Schema.org dateModified 不可用,是否应该有一些默认值? [英] Should Schema.org dateModified have some default value if not available?

查看:22
本文介绍了如果 Schema.org dateModified 不可用,是否应该有一些默认值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于 Schema.org Article 我在 https://developers.google.com/structured-data/testing-tool/ 用于 日期修改:

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

推荐使用 dateModified 字段.如果可用,请提供一个值.

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

我必须写一些我没有修改日期的东西吗?因为很多帖子没有更新.我不确定 Google 是否只告诉我推荐它,因为有一个鲜红色的标志告诉我我有一个错误,这对我的老板来说看起来不太好,他会在我后面检查:)

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 :)

推荐答案

SDTT 不是通用的 Schema.org 验证器.它主要检查基于 Schema.org 的结构化数据以获取 Google 自己的搜索结果功能.如果 Google 的工具报告错误,并不一定意味着您的标记有误,通常仅意味着您赢了无法获得特定的 Google 搜索结果功能.

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.

词汇 Schema.org 不需要任何属性.不提供 dateModified 属性 完全没问题,这是正确的做法如果您的出版物尚未修改.

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,Google Top Stories with AMP 功能的文档,对于未修改的发布,省略该属性或将其设置为与 datePublished 相同的值.)

(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.)

这篇关于如果 Schema.org dateModified 不可用,是否应该有一些默认值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆