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

Absolute permalinks break paginator when permalink is specified for index file #1625

Closed
benbalter opened this Issue Oct 9, 2013 · 5 comments

Comments

Projects
None yet
5 participants
@benbalter
Contributor

benbalter commented Oct 9, 2013

Here's a fun one...

Steps to reproduce

  1. Create a new site
  2. Create 2 or more dummy posts
  3. Create an index file, setting permalink: / in the yml front matter
  4. Add a paginator loop to the index file
  5. Specific pagination (e.g., paginate: 5) and relative_permalinks: false in _config.yml

Expected

  • Index.html will be paginated with the specified number of posts

Actual

  • Index.html has 1-2 posts (missing the rest)

Resolution

  • Specify relative_permalinks: true in config.yml
  • Don't specify a permalink in index.html's YML frontmatter

Wat.

H/t @jlord for discovering it.

@parkr

This comment has been minimized.

Show comment
Hide comment
@parkr

parkr Oct 9, 2013

Member

This is suuuuper weird. Only took me a few minutes to figure out a good guess though. :facepalm:

  1. The permalink is used to determine the URL of the page
  2. The URL of the page is used to determine the dir of the page
  3. We use this URL-based dir to determine where the pagination pages should be built.

If that dir is /, then it'll just overwrite your index.html with the subsequent pagination pages over and over and over again.

Member

parkr commented Oct 9, 2013

This is suuuuper weird. Only took me a few minutes to figure out a good guess though. :facepalm:

  1. The permalink is used to determine the URL of the page
  2. The URL of the page is used to determine the dir of the page
  3. We use this URL-based dir to determine where the pagination pages should be built.

If that dir is /, then it'll just overwrite your index.html with the subsequent pagination pages over and over and over again.

@mattr-

This comment has been minimized.

Show comment
Hide comment
@mattr-

mattr- Oct 17, 2013

Member

Are both of the resolution steps required or is it as simple as not specifying a permalink in index.html's YAML frontmatter?

Member

mattr- commented Oct 17, 2013

Are both of the resolution steps required or is it as simple as not specifying a permalink in index.html's YAML frontmatter?

@benbalter

This comment has been minimized.

Show comment
Hide comment
@benbalter

benbalter Oct 17, 2013

Contributor

Either or.

Contributor

benbalter commented Oct 17, 2013

Either or.

@AJ-Acevedo

This comment has been minimized.

Show comment
Hide comment
@AJ-Acevedo

AJ-Acevedo Oct 29, 2013

Contributor

Is this effecting all index.html files or just the site root?

ie: about/index.html

Contributor

AJ-Acevedo commented Oct 29, 2013

Is this effecting all index.html files or just the site root?

ie: about/index.html

@parkr parkr modified the milestones: 2.1, 2.0 May 5, 2014

@parkr parkr modified the milestones: 2.2, 2.1 Jun 16, 2014

@parkr

This comment has been minimized.

Show comment
Hide comment
@parkr

parkr Jul 31, 2014

Member

Re-opening on jekyll-paginate.

Member

parkr commented Jul 31, 2014

Re-opening on jekyll-paginate.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.