Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTML5: Google rel="publisher" shall be link tag #276

Closed
wants to merge 2 commits into from

Conversation

jrbenito
Copy link
Contributor

Configuration

  • Operating system with version : Ubuntu (doesn´t matter)
  • Node version : 4.4.3 (doesn´t matter)
  • Hexo version : 3.2.0 (doesn´t matter)
  • Hexo-cli version : --

Changes proposed

  • Change to to avoid HTML 5 validation errors.

Actual Google rel="publisher" is generated as tag. This causes
errors in HTML5 validation because has no attribute "rel" and
also, shall have a name, itemprop, property or http-equive
attributes.

Changing it to tag solves these validations errors and makes
Google rich snippets work. It is important to notice that rel="publisher"
is meant to link a Google+ business page and not to individuals G+ page.

ToDo:
I don´t know if this affects or not the result but for future we shall
think in have a 'business' property in theme _config.yml and author
property as already set. Then we might create rel="publisher"
pointing to the business and rel="author" linking to author´s G+ page.

Signed-off-by: Josenivaldo Benito Jr jrbenito@benito.qsl.br

Actual Google rel="publisher" is generated as <meta> tag. This causes
errors in HTML5 validation because <meta> has no attribute "rel" and
also, <meta> shall have a name, itemprop, property or http-equive
attributes.

Changing it to <link> tag solves these validations errors and makes
Google rich snippets work. It is important to notie that rel="publisher"
is meant to link a Google+ business page and not to individuals G+ page.
I don´t know if this affects or not the result but for future we shall
think in have a 'business' property in theme _config.yml and author´s as
already set. Then we might create rel="publisher" pointing to the
business and rel="author" linking to author´s G+ page.

Signed-off-by: Josenivaldo Benito Jr <jrbenito@benito.qsl.br>
Last commit was incomplete, need to change from content to href
attribute in <link> tag.

Signed-off-by: Josenivaldo Benito Jr <jrbenito@benito.qsl.br>
@LouisBarranqueiro
Copy link
Owner

Then let's update this one to rel="author" . And create a new variable in _config.yml like author.google_plus_business to store google plus brand/business and display it with a `rel="publisher".

What do you think?

@jrbenito
Copy link
Contributor Author

I will update PR.

@jrbenito
Copy link
Contributor Author

I submitted a new PR #282 for this feature.

@jrbenito jrbenito closed this Jun 21, 2016
@jrbenito jrbenito deleted the link-rel branch June 21, 2016 02:45
@jrbenito jrbenito restored the link-rel branch July 6, 2016 17:53
@jrbenito jrbenito deleted the link-rel branch July 6, 2016 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants