Permalink
Browse files

Refactor blog to make excerpt and description the same. Preserve old …

…ones
  • Loading branch information...
joequery committed Jul 17, 2012
1 parent 420580a commit 7021d5f9fcf0b4529a06abcbd62f0f674a73cd9e
Showing with 5 additions and 5 deletions.
  1. +5 −1 blog/helpers.py
  2. +0 −4 blog/posts/example/meta.py
View
@@ -42,10 +42,14 @@ def get_posts(app, numPosts, start=0):
bodyPath = os.path.join("posts", post, 'body.html')
metaData = imp.load_source('data', metaPath)
+ # Old posts used a custom excerpt. Now the excerpt and description
+ # are the same, labeled under "description".
+ description = metaData.description or metaData.excerpt
+
postTime = time.strptime(metaData.time, "%Y-%m-%d %a %H:%M %p")
postDict = {
'title' : metaData.title,
- 'description' : metaData.excerpt,
+ 'description' : description,
'url': "/blog/%s" % post,
'pubDate': time.strptime(metaData.time, "%Y-%m-%d %a %H:%M %p")
}
@@ -1,7 +1,3 @@
-
title="Example post"
description="This will show up for google description"
time="2012-07-05 Thu 02:53 PM"
-excerpt="""Post excerpt goes here. You can make it as long as
-you want. Make sure to use triple string!"""
-

0 comments on commit 7021d5f

Please sign in to comment.