Comment Jekyll blog from Fediverse

Add comments to static website build with Jekyll

Thanks to @carl and his toot about adding comments to Hugo static site. Read source for deeper understanding.

Comment Jekyll site

with small changes and tweaking the code to my preferences I’ve added the same implementation to this jekyll site.

You can add comments to any page on your site just adding some keys to your page front-matter section.

  show: true
  fediusername: carl
  fediid: 105463655803971969

beware of front-matter formatting (two spaces indent)

  • show: true/false to control visibility

from your toot

this toot and its thread will load on your website on demand when pressing LOAD/CARGAR comments button (or any link you may want to use to trigger javascript code).

screenshot showing comments on my blog



Get the code to include on your template or page

I had to upload it to this external service because jekyll here read it and interpreted as part of the code so some code was lacking.

CSS classes and formatting can be set to better suit to your website.

You have to add purify.min.js and to your site to clean and sanitize response from server.

Test it!!

here below you can add a comment or just reply to this toot



Utiliza a túa conta no fediverso // Comment using your fediverse account.