From c4cf167ff1da4782dcf6cd16f2f79f132fbc99ad Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Sat, 8 Jun 2013 17:46:58 +0200 Subject: [PATCH] Add documentation about paginate_path to "Templates" page in the docs. Closes #1129. --- site/docs/pagination.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/site/docs/pagination.md b/site/docs/pagination.md index a992cc79..99e0b044 100644 --- a/site/docs/pagination.md +++ b/site/docs/pagination.md @@ -32,6 +32,18 @@ paginate: 5 The number should be the maximum number of Posts you’d like to be displayed per- page in the generated site. +You may also specify where the destination of the pagination pages: + +{% highlight yaml %} +paginate_path: "blog/page:num" +{% endhighlight %} + +This will read in `blog/index.html`, send it each pagination page in Liquid as `paginator` +and write the output to `blog/page:num`, where `:num` is the pagination page number, +starting with `2`. If a site has 12 posts and specifies `paginate: 5`, Jekyll will write +`blog/index.html` with the first 5 posts, `blog/page2/index.html` with the next 5 posts +and `blog/page3/index.html` with the last 2 posts into the destination directory. + ## Liquid Attributes Available The pagination plugin exposes the `paginator` liquid object with the following