// 1. Add the javascript file to your header <script src="https://cdn.rawgit.com/benwinding/ycomments/b7310c55/dist/ycomments.min.js" ></script>
// 2. Add the div tag where you want the comments to end up.
// Automatic lookup based on page URL.
<div comments="auto"></div>
// Manual lookup based on post id.
<div comments="16582136"></div>
The comments will adjust to what ever container they're in.
The script can either fetch a specific item, or dynamically query based on the URL
The script talks directly to the open source Hacker News public api from the users browser.
Some questions you might have...
I wanted to see if it was possible to dynamically show the related discussion on the site it was on... pretty meta
It queries the Hacker News api based on the id provided in the div tag.
It queries the Hacker News API directly using the current URL of the page it's on.