S Lazy-H
  • Home
  • About
  • Posts
  • Contact
  • Slide Rules
  • A Biker’s Tale

Adding Comments to Posts

Quarto
R Programming
Author

Sam Hutchins

Published

February 4, 2024

I’ve been reading up on adding comments to posts using Quarto, so I thought I’d see if I can make it work for this post. So this is a short post just for that purpose. I am using utterances to do this through GitHub, and storing the comments in a public repository. Let’s see if I can annotate all the steps I did to make this happen.

First, I created a GitHub public repository for the comments. Lets call it repoName for this example. Then, in that repository’s General Settings, I checked the Discussions block. This is after installing utterances to that repository.

Going to the utterances website to set the configurations and selecting the repo just created on the GitHub website, seems pretty straight forward. The suggested script at the bottom of the page didn’t do anything when I included it in this same post. What I did then was delete the script section, and add to the metadata at the top of the post, this,

comments:
  utterances:
    repo: owner/repoName

This placed the comment section just after the footer element as this post shows. I will insert the above in the template file I use for posts, so it will be included. If I don’t want comments to a particular post, I can just delete those lines. What’s nice is by using GitHub sign-in, this prevents spam and bots from leaving comments or entries, hopefully.

I may not have done the above steps it that order as I was attempting to research how to do this at first. Several Internet posts such as this,1 this2 and this3 were similar, but suggested somewhat different paths, or indicated other methodology for accomplishing this. Not all references noted were applicable for Quarto perhaps. In any case, the above steps seemed to work for me. The references are listed in no particular order, but that they are nicely staggered in the footnote section.

So, I hope this will be helpful to someone. Have a great day, and God Bless!

Footnotes

  1. Ref: https://albert-rapp.de/posts/13_quarto_blog_writing_guide/13_quarto_blog_writing_guide.html↩︎

  2. Ref: https://beamilz.com/posts/2022-06-05-creating-a-blog-with-quarto/en/↩︎

  3. Ref: https://www.youtube.com/watch?v=B1lFrISHoCI↩︎

© S Lazy-H 2019 -