Add a '/' to paginate_path in the Documentation on the Pagination page #3479

Merged
merged 1 commit into from Feb 18, 2015

Conversation

Projects
None yet
3 participants
@tuzhucheng
Contributor

tuzhucheng commented Feb 18, 2015

If this '/' is not present, then the second pagination code snippet
under the "Render the paginated Posts" section will have a bug.

Let's say my page 1 is located at host:port/blog/index.html and my
paginate_path setting in _config.yml is "blog/page:num/". The
observation if the paginate_path does not start with a '/' is that the href generated for the page numbers will have 2 'blog's, i.e. for page 2 the href will
incorrectly appear as 'host:port/blog/blog/page2' instead of just
'host:port/blog/page2'.

jekyll_doc_bug

This will be resolved by prepending a '/' to the paginate_path configuration. Note that adding a '/' will also be consistent with the format of paginator.next_page_path and paginator.previous_page_path since they also start with a '/'.

Add a '/' to paginate_path
If this '/' is not present, then the second pagination code snippet
under the "Render the paginated Posts" section will have a bug.

Let's say my page 1 is located at host:port/blog/index.html and my
paginate_path setting in _config.yml is "blog/page:num/". The
observation if the paginate_path does not start with a '/' is that the href generated for the page numbers will have 2 'blogs', i.e. for page 2 the href will
incorrectly appear as 'host:port/blog/blog/page2' instead of just
'host:port/blog/page2'.
@parkr

This comment has been minimized.

Show comment
Hide comment
Member

parkr commented Feb 18, 2015

:shipit:

@parkr parkr merged commit 2953446 into jekyll:master Feb 18, 2015

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

parkr added a commit that referenced this pull request Feb 18, 2015

@parkr parkr added the Documentation label Feb 18, 2015

@jekyll jekyll locked and limited conversation to collaborators Feb 27, 2017

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