aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authorYuchen Pei <me@ypei.me>2018-05-12 16:55:31 +0200
committerYuchen Pei <me@ypei.me>2018-05-12 16:55:31 +0200
commita0c3b540a6da26a79c43296ca059d58cdd1d6687 (patch)
tree03c5228a06559f42e9638bde545eb3bb4ab611ca /engine
parent54d7212b5ac5947d4b15180408337bbc027764d5 (diff)
minor edit on engine
Diffstat (limited to 'engine')
-rw-r--r--engine/engine.py4
1 files changed, 1 insertions, 3 deletions
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)