-
Notifications
You must be signed in to change notification settings - Fork 868
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
SEO optimize pagination with rel="prev" & rel="next" #183
Comments
Hey! That would be valid use if we didn't have actual hyperlinks with rel="prev/next", which we have for a long time now each time you generate pagination with Per HTML5 spec, these rel values are a good enough hint to the user agent that these point to the resources that represent previous/next pages of results. We shouldn't need additional |
If I were to do this how would it be implemented? |
"Google indexing of paginated content, http://www.google.com/support/forum/p/Webmasters/thread?tid=344378292ff91e8d&hl=en |
You would think that rel next/prev on the actual links would be good enough, but not so according to Google. Here is an example from kaminari. |
That feature would be very much appreciated. As others stated here, google only considers relevant the rel attributes inside a link tag, not in an 'a' tag. I am going to do a dirty patch for my project. If things turn out well, I can make a pull request. |
Bump, has this ever been solved? |
Not that I know of. The solution would require a separate will_paginate helper method to generate the |
Our SEO has just asked us for this; and although Kaminari already supports, Kaminari lacks of anchoring support, which is very useful for us... I will also appreciate this, but in the meantime, I'll ask @tganzarolli for his dirty patch. |
Alright, gonna reopen this and anyone is welcome to take a stab at the implementation. |
Pretty much straight port of Kaminari's method in my pull request #324 |
It will be nice if you could merge @lloydmeta 's PR... Thks! |
Just checking in on the status of this pull request. Any chance of it being included? |
I would like this merged as well! |
👍 |
1 similar comment
👍 |
MISLAV WHY U NO MERGE :( |
🕦 |
We are in need of this too! A merge would be kinda cool. 👍 |
👍 |
2 similar comments
👍 |
👍 |
This is a port of PR mislav#324 by @lloydmeta in will_paginate: mislav#324 in response to issue mislav#183: 'SEO optimize pagination with rel="prev" & rel="next"' mislav#183
Thanks @lloydmeta for the PR. I merged it into my version of will_paginate for Ruby 2.2/Rails 5. Folks, |
This is a port of PR mislav#324 by @lloydmeta in will_paginate: mislav#324 in response to issue mislav#183: 'SEO optimize pagination with rel="prev" & rel="next"' mislav#183
Thanks @lloydmeta and @jonatack for your work on this issue. Also, thanks @mislav for building this wonderful gem. Any idea if you actually intend to merge this? If yes, when? Thanks. |
I've made a gist on how to monkey patch will_paginate v3.0.7 to add rel="next" & rel="prev" links to your header. I only use this on pages that require custom link generation, so this also includes a patch to use a custom url generator if a specific option is passed. https://gist.github.com/dignoe/0f76e81949b46e48e4ff4f992aa93aeb |
if you don't like monkey patching: a simple view-helper as a rails-railtie: https://github.com/erpe/rails_will_paginate_seo_helper |
This is a port of PR mislav#324 by @lloydmeta in will_paginate: mislav#324 in response to issue mislav#183: 'SEO optimize pagination with rel="prev" & rel="next"' mislav#183
This is a port of PR mislav#324 by @lloydmeta in will_paginate: mislav#324 in response to issue mislav#183: 'SEO optimize pagination with rel="prev" & rel="next"' mislav#183
Decided not to go with this feature and forgot to close this. #324 (comment) |
I wanted to propose that will_paginate include a view helper for SEO optimization, per a recent official Google blog post
link: http://googlewebmastercentral.blogspot.com/2011/09/pagination-with-relnext-and-relprev.html
Thanks!
The text was updated successfully, but these errors were encountered: