\n'
.format(contentPath = metadata.contentPath,
title = metadata.properties["TITLE"],
- published = metadata.properties["PUBLISHED"].strftime("%B %d, %Y"),
+ published = getPrettyHtmlTime(metadata.properties["PUBLISHED"]),
tagsHtml = tagsHtml))
# Home is also just a rendered content file, just with a special name
@@ -66,9 +64,12 @@ class HomeHandler(tornado.web.RequestHandler):
class BlogHandler(tornado.web.RequestHandler):
def get(self, request):
renderedBody = getBlogHtmlBody(request)
+ metadata = ContentConverter.getRenderedContentDictionary()[request]
self.render("templates/BlogPost.html",
- title=getTitleFromBody(renderedBody), postBody=renderedBody)
+ title=metadata.properties["TITLE"],
+ postBody=renderedBody,
+ published=getPrettyHtmlTime(metadata.properties["PUBLISHED"]))
#
# Startup
diff --git a/templates/BlogPost.html b/templates/BlogPost.html
index de4bf31..c456103 100644
--- a/templates/BlogPost.html
+++ b/templates/BlogPost.html
@@ -13,7 +13,10 @@
{% raw postBody %}
+