Skip to content

Commit

Permalink
Add hacker_news_share_url tag
Browse files Browse the repository at this point in the history
  • Loading branch information
tdg5 committed Sep 10, 2015
1 parent 8a6a353 commit 36aae9e
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/octopress-social.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ def item(context, input)
Liquid::Template.register_tag('email_contact_link', Octopress::Social::Email::Tag)
Liquid::Template.register_tag('github_profile_link', Octopress::Social::GitHub::Tag)
Liquid::Template.register_tag('hacker_news_share_link', Octopress::Social::HackerNews::Tag)
Liquid::Template.register_tag('hacker_news_share_url', Octopress::Social::HackerNews::Tag)

if defined? Octopress::Docs
Octopress::Docs.add({
Expand Down
1 change: 1 addition & 0 deletions test/site/_expected/post-loop.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ <h2>Share post</h2>
<a href="https://plus.google.com/share?url=http%3A%2F%2Fexample.com%2Fblog%2Fshare-post%2F">Google+</a>
<a href="https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fexample.com%2Fblog%2Fshare-post%2F">Facebook</a>
<a href="mailto:?subject=Share%20post%20by%20Guy%20McDude&body=Share%20post%20by%20Guy%20McDude%20-%20http%3A%2F%2Fexample.com%2Fblog%2Fshare-post%2F">Email</a>
<a href="http://news.ycombinator.com/submitlink?t=Share%20post%20-%20http%3A%2F%2Fexample.com%2Fblog%2Fshare-post%2F&u=http%3A%2F%2Fexample.com%2Fblog%2Fshare-post%2F">Hacker News</a>

Comment links:
<a class="disqus-comments-link" title="View comments" href="http://example.com/blog/share-post/#disqus_thread">Comments</a>
Expand Down
1 change: 1 addition & 0 deletions test/site/_expected/share-page.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
<a href="https://plus.google.com/share?url=http%3A%2F%2Fexample.com%2Fblog%2Fshare-page.html">Google+</a>
<a href="https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fexample.com%2Fblog%2Fshare-page.html">Facebook</a>
<a href="mailto:?subject=Cool%20Page%20by%20Guy%20McDude&body=Cool%20Page%20by%20Guy%20McDude%20-%20http%3A%2F%2Fexample.com%2Fblog%2Fshare-page.html">Email</a>
<a href="http://news.ycombinator.com/submitlink?t=Cool%20Page%20-%20http%3A%2F%2Fexample.com%2Fblog%2Fshare-page.html&u=http%3A%2F%2Fexample.com%2Fblog%2Fshare-page.html">Hacker News</a>

Comment links:
<a class="disqus-comments-link" title="View comments" href="#disqus_thread">Comments</a>
Expand Down
1 change: 1 addition & 0 deletions test/site/_expected/share-post/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
<a href="https://plus.google.com/share?url=http%3A%2F%2Fexample.com%2Fblog%2Fshare-post%2F">Google+</a>
<a href="https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fexample.com%2Fblog%2Fshare-post%2F">Facebook</a>
<a href="mailto:?subject=Share%20post%20by%20Guy%20McDude&body=Share%20post%20by%20Guy%20McDude%20-%20http%3A%2F%2Fexample.com%2Fblog%2Fshare-post%2F">Email</a>
<a href="http://news.ycombinator.com/submitlink?t=Share%20post%20-%20http%3A%2F%2Fexample.com%2Fblog%2Fshare-post%2F&u=http%3A%2F%2Fexample.com%2Fblog%2Fshare-post%2F">Hacker News</a>

Comment links:
<a class="disqus-comments-link" title="View comments" href="#disqus_thread">Comments</a>
Expand Down
1 change: 1 addition & 0 deletions test/site/_includes/share.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@
<a href="{% gplus_share_url %}">Google+</a>
<a href="{% facebook_share_url %}">Facebook</a>
<a href="{% email_share_url %}">Email</a>
<a href="{% hacker_news_share_url %}">Hacker News</a>
1 change: 1 addition & 0 deletions test/site/_site/post-loop.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ <h2>Share post</h2>
<a href="https://plus.google.com/share?url=http%3A%2F%2Fexample.com%2Fblog%2Fshare-post%2F">Google+</a>
<a href="https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fexample.com%2Fblog%2Fshare-post%2F">Facebook</a>
<a href="mailto:?subject=Share%20post%20by%20Guy%20McDude&body=Share%20post%20by%20Guy%20McDude%20-%20http%3A%2F%2Fexample.com%2Fblog%2Fshare-post%2F">Email</a>
<a href="http://news.ycombinator.com/submitlink?t=Share%20post%20-%20http%3A%2F%2Fexample.com%2Fblog%2Fshare-post%2F&u=http%3A%2F%2Fexample.com%2Fblog%2Fshare-post%2F">Hacker News</a>

Comment links:
<a class="disqus-comments-link" title="View comments" href="http://example.com/blog/share-post/#disqus_thread">Comments</a>
Expand Down
1 change: 1 addition & 0 deletions test/site/_site/share-page.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
<a href="https://plus.google.com/share?url=http%3A%2F%2Fexample.com%2Fblog%2Fshare-page.html">Google+</a>
<a href="https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fexample.com%2Fblog%2Fshare-page.html">Facebook</a>
<a href="mailto:?subject=Cool%20Page%20by%20Guy%20McDude&body=Cool%20Page%20by%20Guy%20McDude%20-%20http%3A%2F%2Fexample.com%2Fblog%2Fshare-page.html">Email</a>
<a href="http://news.ycombinator.com/submitlink?t=Cool%20Page%20-%20http%3A%2F%2Fexample.com%2Fblog%2Fshare-page.html&u=http%3A%2F%2Fexample.com%2Fblog%2Fshare-page.html">Hacker News</a>

Comment links:
<a class="disqus-comments-link" title="View comments" href="#disqus_thread">Comments</a>
Expand Down
1 change: 1 addition & 0 deletions test/site/_site/share-post/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
<a href="https://plus.google.com/share?url=http%3A%2F%2Fexample.com%2Fblog%2Fshare-post%2F">Google+</a>
<a href="https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fexample.com%2Fblog%2Fshare-post%2F">Facebook</a>
<a href="mailto:?subject=Share%20post%20by%20Guy%20McDude&body=Share%20post%20by%20Guy%20McDude%20-%20http%3A%2F%2Fexample.com%2Fblog%2Fshare-post%2F">Email</a>
<a href="http://news.ycombinator.com/submitlink?t=Share%20post%20-%20http%3A%2F%2Fexample.com%2Fblog%2Fshare-post%2F&u=http%3A%2F%2Fexample.com%2Fblog%2Fshare-post%2F">Hacker News</a>

Comment links:
<a class="disqus-comments-link" title="View comments" href="#disqus_thread">Comments</a>
Expand Down

0 comments on commit 36aae9e

Please sign in to comment.