【问题标题】:HTML 5 google publisher link validation errorHTML 5 谷歌发布者链接验证错误
【发布时间】:2012-12-04 19:45:50
【问题描述】:

HTML 5 google 发布者链接验证错误:

    Error: Bad value publisher for attribute rel on element link: Not an absolute IRI. The string publisher is not a registered keyword or absolute URL.

From line 13, column 1; to line 13, column 75

</script>↩<link href="https://plus.google.com/my publisher id" rel="publisher"> ↩</he

Syntax of absolute IRI:
    An absolute URL. For example: http://example.org/hello, but not /hello. Spaces should be escaped as %20. 

【问题讨论】:

  • 好像没有人知道我的问题的解决方案?

标签: html validation google-plus


【解决方案1】:

你有没有试过这个:

<link rel="author" href="https://plus.google.com/PUBLISERID?rel=publisher">

通过 HTML5 验证。

【讨论】:

  • 如果您想将作者身份设置为个人资料并将 rel=publisher 设置为您的 Google+ 公司页面,这会不会发生冲突?
  • rel="publisher 语句在 W3C 的链接标记中无效。因此,如果您想放置您的 G+ 个人资料和 G+ 页面,您应该在两者中都使用 rel="author。不管有没有两个。
  • 通过 HTML 验证不应该是目标。目标是让 Google 识别出正确的标签。
  • 这个问题是关于 HTML 代码验证的,就是这样。出于您的目的,您可以使用:&lt;link rel="author" href="https://plus.google.com/PUBLISERID?rel=publisher" /&gt; 代表发布者,&lt;link rel="author" href="https://plus.google.com/PUBLISERID?rel=author" /&gt; 代表作者。无论如何,谷歌通过网站内容上的 G+ 按钮和其他工具 developers.google.com/+/web/+1button 将网站与 G+ 页面相关联。
  • 感谢 Albert,这很有道理,我没有注意到查询字符串中的 rel=publisher
【解决方案2】:

如果您正在使用:

<link rel="author" href="https://plus.google.com/PUBLISERID?rel=publisher" />

Google 找不到发布者链接!

更好的解决方案是:

<a href="https://plus.google.com/PUBID?rel=publisher" rel="publisher">Google Page</a>

通过 HTML5 验证!

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-06-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多