From a0c3b540a6da26a79c43296ca059d58cdd1d6687 Mon Sep 17 00:00:00 2001 From: Yuchen Pei Date: Sat, 12 May 2018 16:55:31 +0200 Subject: minor edit on engine --- engine/engine.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'engine/engine.py') diff --git a/engine/engine.py b/engine/engine.py index 91532fd..7cb45e9 100644 --- a/engine/engine.py +++ b/engine/engine.py @@ -59,9 +59,7 @@ def main(): with open(templatesdir + 'barepost.html') as f: template = f.read() #headposts is the list of the first few posts, to be displayed on blog.html - headposts = {'body': ''} - for post in posts[:homepostnum]: - headposts['body'] += combine(post, template)['body'] + headposts = {'body' : ''.join([combine(post, template)['body'] for post in posts[:homepostnum]])} with open(templatesdir + 'blog.html') as f: template = f.read() headposts = combine(headposts, template) -- cgit v1.2.3