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

Added the option to specify the paginated url format #342

Merged
merged 4 commits into from Apr 24, 2012

Conversation

Projects
None yet
4 participants
@daneharrigan
Contributor

daneharrigan commented Jun 5, 2011

I put my blog articles in /blog, but the paginated links were still /page2 and /page3 so I made "paginate_path" as a value you can set in the _config.yml or at the command-line. There is only one variable in paginate_path, ":num" so you can do things like... paginate_path: "/blog/page-:num"

If you don't set a paginate_path value it will default to Jekyll's current format, "page:num"

Show outdated Hide outdated lib/jekyll/generators/pagination.rb
private
def paginate_path(site, num_page)
format = site.config['paginate_path'] || "page:num"

This comment has been minimized.

@mojombo

mojombo Jan 16, 2012

Contributor

I think it would be better if the default page link format was specified in the default config and allowed to be updated via the _config.yml file. Otherwise this looks great.

@mojombo

mojombo Jan 16, 2012

Contributor

I think it would be better if the default page link format was specified in the default config and allowed to be updated via the _config.yml file. Otherwise this looks great.

@jhartz

This comment has been minimized.

Show comment
Hide comment
@jhartz

jhartz Feb 27, 2012

I don't know much ruby, so I can't do this myself, but could this possibly be implemented? (Especially for use on Github Pages, where custom plugins aren't allowed)

jhartz commented Feb 27, 2012

I don't know much ruby, so I can't do this myself, but could this possibly be implemented? (Especially for use on Github Pages, where custom plugins aren't allowed)

@daneharrigan

This comment has been minimized.

Show comment
Hide comment
@daneharrigan

daneharrigan Feb 27, 2012

Contributor

@mojombo let me know if you need any other changes

Contributor

daneharrigan commented Feb 27, 2012

@mojombo let me know if you need any other changes

@mojombo mojombo merged commit 316cc85 into jekyll:master Apr 24, 2012

@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.