Permalink
Browse files

Adding hacker news button from igrigorik

  • Loading branch information...
1 parent 9f40242 commit 37ab42ac7b0ad086e849a2292dc8bc92afb8fc43 @kgn committed Apr 16, 2012
Showing with 13 additions and 0 deletions.
  1. +10 −0 .themes/classic/source/_includes/post/sharing.html
  2. +3 −0 _config.yml
@@ -2,6 +2,16 @@
{% if site.twitter_tweet_button %}
<a href="http://twitter.com/share" class="twitter-share-button" data-url="{{ site.url }}{{ page.url }}" data-via="{{ site.twitter_user }}" data-counturl="{{ site.url }}{{ page.url }}" >Tweet</a>
{% endif %}
+ {% if site.hackernews_button %}
+ <a href="http://news.ycombinator.com/submit" class="hn-share-button" data-title="{{ page.title }}" data-url="{{ site.url }}{{ page.url }}">Vote on HN</a>
+ <script>
+ (function() {
+ var hn = document.createElement('script'); hn.type = 'text/javascript';
+ hn.async = true; hn.src = 'http://hnbutton.appspot.com/static/hn.js';
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(hn, s);
+ })();
+ </script>
+ {% endif %}
{% if site.google_plus_one %}
<div class="g-plusone" data-size="{{ site.google_plus_one_size }}"></div>
{% endif %}
View
@@ -71,6 +71,9 @@ twitter_follow_button: true
twitter_show_follower_count: false
twitter_tweet_button: true
+# Hacker News
+hackernews_button: false
+
# Google +1
google_plus_one: false
google_plus_one_size: medium

0 comments on commit 37ab42a

Please sign in to comment.