From: Leandro Lucarella Date: Tue, 1 Jun 2010 00:17:09 +0000 (-0300) Subject: Add an option to choose how many posts to show X-Git-Url: https://git.llucax.com/software/blitiri.git/commitdiff_plain/b757e5a6dd55cc8cc67721a750665f5f2dd7906b?ds=inline Add an option to choose how many posts to show --- 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 +