I think I’ve managed to set up a blog comment feature for each of the posts.
As usual, the quarto documentation is great, though information on comments is in the HTML basics section rather than the website or blog section, so takes a bit of hunting. Albert Rapp’s very comprehensive blogpost is a great resource, covering this and much else.
The Quarto documentation gives three options for comments:
- Hypothes.is, which allows comments and annotations to be provided line-by-line, a bit like non-editable tracked changes.
- utterances, which is a lightweight interface based on the discussion feature in github.
- giscus, which seems to be built on utterances, but a bit more heavy-weight/opinionated.
I’ve attempted, and think I’ve managed to implement, utterances.
In order to make a comment on a post, you need to have a Github username, and log in.
From my end, I needed to do the following:
- Set up a public Github repo for blog comments. I unimaginately called this
BlogComments
- Install utterances on github and associate it with this repo
- Within the file
posts/_metadata.yml
, add the following declaration
comments:
utterances:
repo: JonMinton/BlogComments
Parameters in posts/_metadata.yml
are applied to all posts within the posts
subdirectory. This should mean that each post will now contain a comment box at the bottom.
When a comment is added by a registered Github user, metadata from the specific post being commented on should be appended to an issue/discussion post within the JonMinton/BlogComments
directory. And whenever a post is rendered, all associated discussion/issue items in the BlogComments
repo should be fetched and shown at the bottom of the post.
I’ve said should because I’ve only just set this up, and there are currently no comments.
Why not try to add a comment and see what happens?!