Created
June 19, 2012 16:01
-
-
Save zzzeek/2954978 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -r 7c960a5fe1c0 -r 36d51cb2171d _controllers/blog/post.py | |
--- a/_controllers/blog/post.py Mon Jun 18 11:53:28 2012 -0400 | |
+++ b/_controllers/blog/post.py Tue Jun 19 11:59:17 2012 -0400 | |
@@ -93,6 +93,9 @@ | |
self.slug = None | |
self.draft = False | |
self.filters = None | |
+ | |
+ self.hn_link = None | |
+ | |
self.__parse() | |
self.__post_process() | |
diff -r 7c960a5fe1c0 -r 36d51cb2171d _posts/0058. server-side-templates-are-fine.rst | |
--- a/_posts/0058. server-side-templates-are-fine.rst Mon Jun 18 11:53:28 2012 -0400 | |
+++ b/_posts/0058. server-side-templates-are-fine.rst Tue Jun 19 11:59:17 2012 -0400 | |
@@ -2,6 +2,7 @@ | |
categories: Code, Mako | |
date: 2012/06/18 12:01:00 | |
title: "Server Side Templates and API Centric Development" | |
+hn_link: http://news.ycombinator.com/item?id=4127037 | |
--- | |
We're here to talk about the rise of the API-focused application, and how it | |
interacts with templates for rendering HTML for web browsers. The simple point I hope | |
diff -r 7c960a5fe1c0 -r 36d51cb2171d _templates/post.mako | |
--- a/_templates/post.mako Mon Jun 18 11:53:28 2012 -0400 | |
+++ b/_templates/post.mako Tue Jun 19 11:59:17 2012 -0400 | |
@@ -17,6 +17,11 @@ | |
% if bf.config.blog.disqus.enabled: | |
| <a href="${post.permalink}#disqus_thread">View Comments</a> | |
% endif | |
+% if post.hn_link: | |
+ <div id="hn_bar"> | |
+ Discuss this on <a href="${post.hn_link}">Hacker News</a> | |
+ </div> | |
+% endif | |
</small></div> | |
<span class="post_prose"> | |
<%block name="post_prose" args="post"> | |
diff -r 7c960a5fe1c0 -r 36d51cb2171d css/style.css | |
--- a/css/style.css Mon Jun 18 11:53:28 2012 -0400 | |
+++ b/css/style.css Tue Jun 19 11:59:17 2012 -0400 | |
@@ -165,6 +165,10 @@ | |
margin-bottom:12px; | |
} | |
+.blog_post #hn_bar { | |
+ float:right; | |
+} | |
+ | |
.figure { | |
margin:20px 0px 20px 0px; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment