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

Wrong path in link rel prev/next #145

Closed
XhmikosR opened this issue Jan 8, 2019 · 9 comments
Closed

Wrong path in link rel prev/next #145

XhmikosR opened this issue Jan 8, 2019 · 9 comments

Comments

@XhmikosR
Copy link

XhmikosR commented Jan 8, 2019

While trying to switch to this gem in twbs/blog#99, I noticed the following:

<link rel="prev" href="https://blog.getbootstrap.com/index.html" />
<link rel="next" href="https://blog.getbootstrap.com/page3/index.html" />

This is wrong in the sense it doesn't account for the permalink setting. Using v2.1.0.

@ashmaroli
Copy link
Contributor

In other words, if the global setting is permalink: pretty, then the expected result is:

<link rel="prev" href="https://blog.getbootstrap.com/" />
<link rel="next" href="https://blog.getbootstrap.com/page3/" />

I believe this issue is the same even on versions older than v2.1.0

@ashmaroli
Copy link
Contributor

That said I'm not sure if the issue is with this plugin or jekyll-seo-tag because the markup is a result of the following template used in jekyll-seo-tag:

{% if paginator.previous_page %}
  <link rel="prev" href="{{ paginator.previous_page_path | absolute_url }}" />
{% endif %}
{% if paginator.next_page %}
  <link rel="next" href="{{ paginator.next_page_path | absolute_url }}" />
{% endif %}

@XhmikosR
Copy link
Author

XhmikosR commented Jan 8, 2019

This is a regression in 2.1.0. With v2.0.0 it's fine here:

<link rel="prev" href="http://localhost:4000/" />
<link rel="next" href="http://localhost:4000/page3/" />

@ashmaroli
Copy link
Contributor

Oh I see..
Since, v2.1.0 is entirely composed of changes I proposed, I'm morally obligated to investigate this issue further..

@ashmaroli
Copy link
Contributor

After some investigation this seems to be a result of change in 8d45997

I'm not sure how exactly to proceed now. Revert that change and re-introduce the resolved issue or, find another alternative..
Feedback invited.

@XhmikosR
Copy link
Author

XhmikosR commented Jan 8, 2019

I think both are real issues so ideally a proper fix should be made :)

@XhmikosR
Copy link
Author

Any news about this? It's a regression compared to v2.0.0.

@sverrirs
Copy link
Owner

sverrirs commented Feb 8, 2020

Could you please upgrade to https://rubygems.org/gems/jekyll-paginate-v2/versions/3.0.0 and test again for me?

@XhmikosR
Copy link
Author

It seems this is fixed now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants