From 3f9319d55fd6c3a85f4c9544c924c629b00b94db Mon Sep 17 00:00:00 2001 From: Laureline Guerin Date: Fri, 18 Feb 2011 11:21:33 +0100 Subject: [PATCH] some doc about pagination --- docs/settings.rst | 6 ++++ docs/themes.rst | 70 ++++++++++++++++++++++++++++++++++++++--------- 2 files changed, 63 insertions(+), 13 deletions(-) diff --git a/docs/settings.rst b/docs/settings.rst index 9fa3bcd3..2b03d92e 100644 --- a/docs/settings.rst +++ b/docs/settings.rst @@ -76,6 +76,12 @@ Setting name what it does ? `TRANSLATION_FEED` Where to put the RSS feed for translations. Default is feeds/all-%s.atom.xml where %s is the name of the lang. +`WITH_PAGINATION` Activate pagination. Default is True. +`DEFAULT_PAGINATION` The maximum number of articles to include on a page, + not including orphans. Default is 5. +`DEFAULT_ORPHANS` The minimum number of articles allowed on the last + page, defaults to zero. Use this when you don't want + to have a last page with very few articles. ======================== ======================================================= Themes diff --git a/docs/themes.rst b/docs/themes.rst index 7d492544..037218fb 100644 --- a/docs/themes.rst +++ b/docs/themes.rst @@ -66,18 +66,50 @@ categories A dict containing each category (keys), and the pages The list of pages ============= =================================================== +index.html +---------- + +Home page of your blog, will finally remain at output/index.html. + +If pagination is active, next pages will remain at output/index`n`.html. + +=================== =================================================== +Variable Description +=================== =================================================== +articles_paginator A paginator object of article list +articles_page The current page of articles +dates_paginator A paginator object of article list, ordered by date, + ascending +dates_page The current page of articles, ordered by date, + ascending +page_name 'index'. Usefull for pagination links. +=================== =================================================== + category.html ------------- This template will be processed for each of the existing categories, and will finally remain at output/category/`category_name`.html. -============= =================================================== -Variable Description -============= =================================================== -articles The articles of this category -category The name of the category being processed -============= =================================================== +If pagination is active, next pages will remain at +output/category/`category_name``n`.html. + +=================== =================================================== +Variable Description +=================== =================================================== +category The name of the category being processed +articles Articles of this category +dates Articles of this category, but ordered by date, + ascending +articles_paginator A paginator object of article list +articles_page The current page of articles +dates_paginator A paginator object of article list, ordered by date, + ascending +dates_page The current page of articles, ordered by date, + ascending +page_name 'category/`category_name`'. Usefull for pagination + links. +=================== =================================================== article.html ------------- @@ -96,11 +128,23 @@ tag.html -------- For each tag, this template will be processed. It will create .html files in -/output/tag/`tag_name`.html +/output/tag/`tag_name`.html. -============= =================================================== -Variable Description -============= =================================================== -tag The name of the tag being processed -articles Articles related to this tag -============= =================================================== +If pagination is active, next pages will remain at +output/tag/`tag_name``n`.html. + +=================== =================================================== +Variable Description +=================== =================================================== +tag The name of the tag being processed +articles Articles related to this tag +dates Articles related to this tag, but ordered by date, + ascending +articles_paginator A paginator object of article list +articles_page The current page of articles +dates_paginator A paginator object of article list, ordered by date, + ascending +dates_page The current page of articles, ordered by date, + ascending +page_name 'tag/`tag_name`'. Usefull for pagination links. +=================== ===================================================