I currently use Jekyll to generate my blog posts that you see hosted here. One thing I have wanted was to add a commenting system. Inspired by this recent toot by @joel@fosstodon.org, and as I am a proponent of the Fediverse and a Mastodon user, I took a first stab at setting up comments collected the notes below.
At the moment the comment solution closely based based on primary work by Carl Schwan and others who have built upon it. See the references section below for more information on the sources I drew upon.
Modifications to Jekyll
Two modifications were needed to get this working form my Jekyll blog set up. First I had to create the fediverse_comments.html file and save it in the _includes directory of my project. The contents of the file are currently as follows.
_includes/fediverse_comments.html
The second change I made was to modify the existing posts.html file in my project’s _layouts directory to include the fesiverse_comments.html file (above) if the front matter for a post includes a comments section. The entire file is a below, but the lines that matter are:
_layouts/post.html
Work Flow and Usage
Work Flow Enabling Comments for Article
Create an article for publication on my web log in markdown.
Create a toot on Mastodon linking to the article.
Get the ID # of the toot from URL of expanded toot.
Edit the original web log article and include comments section in the headmatter like such, replacing the id: with the value of that associated with the Mastodon toot related to the artcle:
Save and republish the article with no other changes.
Replying and Viewing Comments
To view comments (if any) in article in website, click Load Comments button at battom of post.
Original toot and related comments should appear after a moment.
If there is no Load Comments button, then the article does not have comments enabled.
To reply or comment on an article:
You should have an account on a Mastodon instance. It is possible other Fediverse accounts will work as well, but I have not tested.
Click the reply button at the bottom of the article.
If there is no Reply button then comments have not been enabled for the post.
After clicking on Reply button, enter your account and Mastodon instance name in the format account@instance.name in the field and click on Proceed to Reply and you should be taken to the toot and comments on Mastodon wher you can reply to the original post or one of the comments.
Chrls is currently a technology transformation leader at one of the oldest American investment banking services holding companies, headquartered in New York City. Previous roles at current employer include project manager, front office support, retail and enterprise global Windows server support. Currently residing in Tennessee on the Cumberland Plateau and enjoying life, family and open source.