5 ms·
Show HN: Hacker News comments for your blog
- rajasimon 6y agoI'm super excited to introduce hnDisq to all. I have a blog website, and I want very simple and no manageable way to add a commenting system to my blog. The idea clicked why not I use Hacker News comment in my blog. Checked their API, and here I'm launching hnDisq. Check out https://hndisq.xyz https://hndisq.xyz and feedback welcome.
- ColinWright 6y agoBy the way, you don't have contact details in your profile, so I thought I'd mention here an answer to a question you asked four years ago. You asked about doing an "ls" when you "cd", and someone gave you this: cd_(){ cd $* ls } alias cd=cd_ That kills you if the directory has thousands of files, and especially if you're working over a slow connection. You can modify it like this: cd_(){ cd $* ls | head -n100 | column } alias cd=cd_ That then only lists up to 100 files. You can further extend it to put "..." if there are more files, but I'll leave that for another time.
- rajasimon 6y agoAh that's the great tip. thanks.
- ColinWright 6y agoI can't see how this is deciding which comments/thread to load. In your example it's loading comments from a thread completely unrelated to the blog post. It's ... confusing.
- rajasimon 6y agoI've mentioned how to setup hndisq in my blog. <div id="hndisq" data-username="hndisq></div> You have to replace username with your username like this. And place this in your blog website. <div id="hndisq" data-username="ColinWright></div> Once that done it will automatically fetch all of your hacker news submission. For example if you have a blog ColinWright.com and you created a new blog ColinWright.com/blog/my-new-blog. And also you submitted the blog to Hacker News then the hacker news comment will automatically load. I'm not good with explaining. Hope you understand the above context.
- ColinWright 6y agoNope, still doesn't make sense. I can include my username, fine, not a problem. But I've submitted multiple blog posts to HN, and many of them have comments here. How does a blog post know how to pick up the comments from the submission it relates to? Specific examples: Here's a blog post: https://www.solipsys.co.uk/new/BeingSlowToCriticise.html?te10hn https://www.solipsys.co.uk/new/BeingSlowToCriticise.html?te1... Here's the HN discussion: https://news.ycombinator.com/item?id=23131350 https://news.ycombinator.com/item?id=23131350 How would that blog post know to pick up that discussion? Here's another blog post: https://www.solipsys.co.uk/new/SellYourselfSellYourWork.html?te20hn https://www.solipsys.co.uk/new/SellYourselfSellYourWork.html... Here's the related HN discussion: https://news.ycombinator.com/item?id=23250289 https://news.ycombinator.com/item?id=23250289 How would that blog post know to pick up that discussion? I think it's potentially a great idea, but I don't see how to use it. You've described that I put in my HN username, and in the example you give I can't see why it's picking up the discussion about netflix. You didn't submit that, and you don't seem to name it anywhere. I don't know what you're actually doing, because what you say doesn't match what I see. Sorry, this might not be clear, but you've got me terribly confused about what it actually does. So let me ask some specific questions: That netflix discussion wasn't submitted by you, and doesn't seem to be related to your HN username. Why is that discussion being loaded in the blog post? If I submit a blog post to HN, what do I put in the blog post to include comments from that specific HN submission? I hope that's clear ... thanks.
- rajasimon 6y agoCurrently hndisq will load the comment posted by you only. When your blog post page loads it will send two things to hndisq. One is the username ( ColinWright ) Another one is href of the current blog page. (https://www.solipsys.co.uk/new/BeingSlowToCriticise.html?te10hn https://www.solipsys.co.uk/new/BeingSlowToCriticise.html?te1...) So I know your username now and I can get all the submission from HN based on your username. And I will use the href to identify the correct submission. Once it found the submission it will use the submission id to load the comment.
- 6y ago