Like the Disqus in this blog, I have just added LinkWithin related posts widget. I dont want to load a lot of stuff, a simple loader button, I am okay with that.

Note

2013-11-10T04:10:34Z: I have replaced LinkWithinbecause the results are not so relatedwith two alternatives: nRelate and Outbrain.

Initially, LinkWithin gives me this piece of code:

<script>
var linkwithin_site_id = <THE_ID>;
</script>
<script src="http://www.linkwithin.com/widget.js"></script>
<a href="http://www.linkwithin.com/"><img src="http://www.linkwithin.com/pixel.png" alt="Related Posts Plugin for WordPress, Blogger..." style="border: 0" /></a>

With some testing, my final addition to my template is:

<section id='post-related'>
  <h2 id='linkwithin-related-posts'>Possibly (not) related posts</h2>
  <div class="linkwithin_div"/>
  <script>var linkwithin_site_id = <THE_ID>;</script>
  <input id='linkwithin-loader-button' onclick='$.ajaxSetup({cache:true});$.getScript(&quot;http://www.linkwithin.com/widget.js&quot;);$.ajaxSetup({cache:false});$(this).remove();' style='width:100%;margin:10px auto;' type='button' value='Click to load related posts via LinkWithin'/>
</section>

with:

#linkwithin_text_0 {
  display: none;
}

Its very similar the one for Disqus, only changes the values and links. I use CSS to hide LinkWithins heading text, which doesnt work very well with my layout, instead of changing text via:

<script>linkwithin_text='Your custom text:'</script>

In the official code, there is a 1x1 image link, I thought I might need it to make sure crawling working, because I suspect thats how LinkWithin being aware of a post. But after clicking on few posts, it can show me related posts, although they dont seem related at this moment. Anyway, that image link isnt required from what Ive seen.


Now, why I want to add LinkWithin? Because for the last year, I have been manually adding related posts lists to posts. I must say, I dont like that, because my posts are in VCS, so any modifications will create new commits. Using automatically generated lists have its trade-off, they might not be actually related to the post, but thats a trade I am willing to exchange with the amounts of commits.

Anyway, I was hoping there is a even easier method, like a link, which leads to related posts services website, where they give you the list. I dont mind redirect readers to other sites, but there seems to be none of such way of providing related posts list.

Enjoy the thumbnaild related posts!