且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

OpenGraph或Schema.org?

更新时间:2023-11-23 21:15:52

因此,从几个陈词滥调和残缺不全的隐喻开始-我们在谈论苹果和橙子,比较OG和Schema.org,以及何时推出.到了这个元数据,课程必不可少.

So, to start with a couple of cliche's and mangled metaphors - we're talking apples and oranges a bit comparing OG and Schema.org, and when it comes to this metadata it's horses for courses.

正确的答案取决于您的意图,即向页面添加元数据.您希望获得什么?您在这里获得的胜利是什么?元数据的不同形式是出于稍微不同的目的.

The right answer depends on your intent, in adding metadata to your page. What is it that you're hoping to gain? What is the win for you here? The different forms of metadata are for slightly different purposes.

Google已经明确表示,它将不再关注微格式,而是关注Schema.org,以构建用于搜索的丰富数据结果.如果您想针对Google进行优化,则必应和其他搜索引擎会添加Schema.org标记.这就是HTML5介入的方向.

Google has made it clear that it's moving away from a focus on microformats and onto a focus on Schema.org in order to build rich-data results for search. If you want to optimize for Google, Bing and other search engines add the Schema.org markup. It's the direction HTML5 has stepped in.

如果要从内容转换为社交对象并使其与Facebook宇宙的社交图建立多点连接中受益,则要添加Facebook OG标记.

Facebook OG markup is to be added if what you want is to benefit from turning your content into a social object and enable its multi-point connectivity to the social graph that is the Facebook universe.

根据我的经验,大多数人都希望从这两种方法中获益-在搜索排名中尽其所能,并通过社交渠道增加覆盖面和分布.因此,恕我直言,***是尽可能全面地添加Schema.org标记,使其适合您的内容并使用Open Graph元数据.他们做的事情略有不同,但却是相辅相成的.

In my experience most people are looking to gain from both approaches - do as well as they can in search rankings and increase reach and distribution through social channels. So, IMHO, it's probably best to be as thorough as possible adding the Schema.org markup where it fits your content and use Open Graph metadata. They do slightly different, but complementary things.