Multiple large stacks of letters leaning to the right side that representing comments.

Experimenting with Jekyll Blog Comments

  • Adam Douglas

The whole point of the content I post is to show a community how wonderful technology is, and how open source is the future as it embodies community. I want to encourage engagement, as we all learn and discover new things in the wonderful world of tech. One such way to create engagement is to allow for comments on the posts I make. Though based on the current times, and my experience long ago dealing with having a comment system I dread to ever have it again. It usually becomes a task that consumes far too much time as you battle against spam, inappropriate comments, and comments that have nothing to do with the post itself. Another solution is using a general contact form, though this is not always an ideal solution. So I took the web, and read a few posts to help finally make my decision at least for now.


I’ve spent some time reading Kev Quirk’s and Joel’s posts on the subject of comments just to try and make myself more informed of the current times. Sounds to me things are still not great in this area. For those that are interested here are the articles that I read.

Contact Form

Previously I was pretty much decided on only using a contact page with a form that sends the message via email to me. However, some folks on Mastodon has pointed out that this is not always ideal due to it takes away freedom of choice, and how can one trust a form due to so much wide spread abuse. All valid points.

I have decided to keep the contact form. However, I will eventually add an email address so the form can be avoid if desired along with my GPG public key so one has the choice of secure communication. I’ve already added social media links for another means of communication.


I strongly feel it is still best to not have a comment system as I don’t want more work, nor do I want have to add more code to my website then necessary. I’ve chosen long ago to keep JavaScript to a minimum. Keeping things simple always seems to be the best policy. No one wants to view and use a website that is slow, and bloated with nonsense.

I like the idea of having a reply via email, and a view Mastodon comments buttons on each post. This provides a convenient way to contact me, and right at the spot where someone would be thinking about sending a comment. I will have to experiment with this idea, and see how my results go.

Implementing Comments

I added a new Jekyll config (_config.yml) value called comments_email, that will store the comments email address. The email address I’m using is just an alias. This allows for me to delete the address at any time I want, and quickly change to another address. I thought this was a smart idea that Kev came up with, and honestly I’ve been doing this for email addresses I give out to the public to avoid hassle down the line for many years now.

Each post will now have a new front matter property called comments_id which was a great idea by Joel. Once I have the post online I will make post on Mastodon, and take the copy the link to get the identifier. Do a quick post update with the ID, and should be good to go. I will definitely have to look at a later time about automating this task to avoid mistakes, and make the process more convenient.

Here is an example of the code I wrote in my post layouts file that creates the comment buttons.

<div class="card-footer">
    <p class="fw-bold mb-2">Comments</p>
    <p class="ms-3">
        <a class="btn btn-primary-light fw-bold" href="mailto:{{ site.comments_email }}?subject=Re: {{ page.title }}" role="button">Reply via email</a>
    {% if page.comments_id %}
        <a class="btn btn-primary-light" href="https://{{ site.mastodon.instance }}/@{{ site.mastodon.username }}/{{ page.comments_id }}" role="button">View Mastodon comments</a>
    {% endif %}


I honestly do not know how this will all go, and I guess time will tell if this works well or not. If by chance it doesn’t I will have to revisit this, though as of right now I have no idea what I would do differently. Thanks to Kev Qurik, and Joel for their insightful posts.

This is post 85 of 100, and is round 2 of the 100 Days To Offload challenge.

    • fix grammar
    • Fix 100 Days To Offload message