News for hackers. Stuff that matters.
Re:Various ways to include comments on a static site (2018) by brundolf on Thursday November 18, 2021 @12:53PM (#29268327)
I wrote some code for my site that 1) finds the most active link to the post on HN, and 2) uses the HN API to pull in and render its comments at the bottom. The site is statically-rendered, but there's a bit of client-side JS that loads the latest comments when you visit the page. Most of the work is done on the back-end; the front-end just grabs the content and drops it in.

Example: https://www.brandons.me/blog/three-types-of-data

Implementation: https://github.com/brundonsmith/website/blob/master/src/load...

There are no comments on this comment yet.