From b757e5a6dd55cc8cc67721a750665f5f2dd7906b Mon Sep 17 00:00:00 2001 From: Leandro Lucarella Date: Mon, 31 May 2010 21:17:09 -0300 Subject: [PATCH] Add an option to choose how many posts to show --- blitiri.cgi | 7 +++++-- config.py.sample | 3 +++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/blitiri.cgi b/blitiri.cgi index 78ee66b..abff92a 100755 --- a/blitiri.cgi +++ b/blitiri.cgi @@ -51,6 +51,9 @@ encoding = "utf8" # below for details. captcha_method = "title" +# How many articles to show in the index +index_articles = 10 + # # End of configuration @@ -1215,7 +1218,7 @@ def handle_cgi(): if atom: articles = db.get_articles(tags = tags) articles.sort(reverse = True) - render_atom(articles[:10]) + render_atom(articles[:index_articles]) elif style: render_style() elif post: @@ -1278,7 +1281,7 @@ def handle_cgi(): articles = db.get_articles(year, month, day, tags) articles.sort(reverse = True) if not year and not month and not day and not tags: - articles = articles[:10] + articles = articles[:index_articles] render_html(articles, db, year) diff --git a/config.py.sample b/config.py.sample index 1b9d077..5a07da7 100644 --- a/config.py.sample +++ b/config.py.sample @@ -47,3 +47,6 @@ encoding = "utf8" # blitiri.cgi for details. captcha_method = "title" +# How many articles to show in the index +index_articles = 10 + -- 2.43.0