Static sites are just static html files, right? Not quite these days. I’ve added comments to my static generated site hosted with Github pages.
In short, you put your source files of your Jekyll website in Github, Github detects it is Jekyll and you get your website. Now with Staticman you can post your comment- or contact form to the Staticman API and Staticman adds the message to your Github repository. Github rebuilds your website and voila… You have a new comment, even in your static webpage!
I’ve added comments to my articles with the help from this blog post. One improvement I made is to reference parent comments of a reply, by its ID instead of its index in the list of comments. This prevents errors when you ever mix the order of comments up, e.g. delete/modify/insert/sort comments.