Adding Comments to your Blog

This walkthrough goes over different ways that you can add comments to your Write.as blog. These commenting options are mostly free & open source and, at most, are on a pay what you want subscription model.

The walkthrough will be updated with more details and methods as they come along. Feel free to leave questions, feedback, and suggestions about other ways to implement comments into Write.as - we’d love to hear them!


Commento

Commento is an awesome open source commenting platform. It is a subscription based on a pay what you want model. After setting up your account, adding Commento to your blog is just a matter of adding some code to the Custom JavaScript of your blog settings:

// src: https://cdn.commento.io/js/commento.js

var topP = document.createElement("p");
topP.innerHTML = '<div id="commento"></div>';
var cont = document.getElementById("wrapper");
cont = document.getElementById("post-body");

if (cont !== null) {
cont.appendChild(topP);
}

Commento allows for people to comment anonymously or with accounts. Big thanks to @Aris for bringing Commento up in a previous form post and @yungleary for helping us work our way to a stable implementation of the Commento embed:

Utterances

Utterances is an open source comment widget that is powered by Github. You need a Github account in order to get started. All you need to do is the following:

  1. Create a repo for your comments.
  2. Install Utterances Github app (make the app apply to the commenting repo or across all your repos)
  3. Add the following code to the Custom JavaScript of your blog settings, changing the :“user/repo” to fit your Github account and comment repo. Learn more about the other attributes here:
var comments = document.createElement("script");
comments.src = 'https://utteranc.es/client.js';
comments.async = true;
comments.crossOrigin = 'anonymous';
comments.setAttribute('repo', 'user/repo');
comments.setAttribute('issue-term', 'pathname');
comments.setAttribute('label', 'write.as');
comments.setAttribute('theme', 'github-light');
document.getElementById('post-body').appendChild(comments);

NOTE - comments can only be created by people that have a Github account. They will be prompted to log in and, once authenticated, they can comment on any of your blog posts. This is great for development focused blogs where the audience most likely has a Github account. Here is an example of Utterances in action. Big thanks to Robert Xu for showing us this!

Hypothesis

Hypothesis is an open source annotation tool that allows for sentence-level comments and highlights across the web. You can set up Hypothesis on your blog to resemble Medium-like highlights and in-line comments on your blog. All you need is a Hypothesis account (it’s free and you get to annotate across the entire web as an extra benefit). Once you’re set up, add the following code to the Custom JavaScript of your blog settings:

// src: https://hypothes.is/embed.js

window.hypothesisConfig = function () {
  return {
    "openSidebar": false, 
    "theme": "clean",
    branding: {
      appBackgroundColor: 'white',
      ctaBackgroundColor: 'rgba(3, 11, 16, 1)',
      ctaTextColor: '#eee',
      selectionFontFamily: 'helvetica, arial, sans serif'
    }
  };
};

This will allow people to highlight and comment on parts of your blog posts as Hypothesis annotations. The commented sentences will turn up as highlighted, allowing for people to see the specific comments.

NOTE - comments can only be done by people with Hypothesis accounts. Again, it’s free and allows you to annotate across the web, not just the one post.

Check out my blog to see Hypothesis in action as a commenting system for a Write.as blog. Past users have implemented it too, including @mikka, so thinks to him for having tried it out:

4 Likes

@cjeller1592 Another open source commenting system is Talkyard. It also has a hosted version, which has a $1.90/mo plan. For that you can use it on as many blogs or domains as you like.

https://www.talkyard.io/about/

1 Like

The problem is all of those products are targeted towards western markets, including Write.as. I think going forward price localization should be considered as part of the federated business model. Because let me tell you what it feels like to pay for each of those services as an university student from a developing country:

  • Write.as Pro subscription normally costs 60$ per year(Less with student discount), which equals to about 400 units in my local currency,
  • Commento also costs 60$ per year at minmum, which again equals to about 400 units
  • [Put some other service with similar pricing here]

Now let me ask you, would you pay 800$ for just two of those services each year? Because unit-wise our income amounts are similar. But due to inflation and other economic circumstances the expense ratio is enormous. (Yes, I could also setup WriteFreely on a cheap AWS but that defeats the whole purpose and also doesn’t really solve the issue. What about those who are not power-users?)

So what does a poor fella like me do? He naturally goes and uses services like Disqus which steals and sells the users’ data without their consent. And their monoculture keeps getting stronger because they are able to attract many customers like me.

GOG.com has a lovely DRM-free business model. But guess what? Everytime I wanted to buy a game from them I have used an IP proxy from Russia to deceive their system and get saner prices in return. Steam doesn’t have that issue, Steam localizes majority of their product prices. But Steam also has DRM and the final say on the matter if you really own a game or not. And that’s why it keeps winning.

I know that there ain’t no such thing as a free lunch. But there could be one such as fair lunch. If privacy-friendly, decentralized services to be gained momentum, they are going to need global support. Privacy shouldn’t be a luxury or only a thing that western people could afford.

So please @matt, @cjeller1592 when you keep working on your next project such as the Remark.as, please keep the users like me in mind. I really love your work, I really want to support it but I also ask for a fair chance.

Going forward, maybe this should be one of the main topics. Money is not everything but it is also important. So we should ask ourselves how can we find the middle ground where it doesn’t put the strain on the service provider or the user in particular.

The current providing a basic service while allowing to pay for extra services model is unfortunately not fair either. Because while one can use the basic service because they wish to do so, the other has to use it because they can’t afford any better.

The tough part of Hypothes.is is having a means of being aware of comments on your website. I’ve been hoping they’d support webmention or have some additional UI for website owners.

I am aware that Jon Udell has built some separate UI that may help out people trying this as a commenting system. Here’s a URL to it with an illustrative example: https://jonudell.info/h/facet/?wildcard_uri=https%3A%2F%2Fblog.cjeller.site%2F*&max=100

2 Likes

Yeah that’s a major catch of using Hypothesis, but seeing Jon’s tool gives me hope. Thanks for linking to that @chrisaldrich! I even think Hypothesis’ UI for searching annotations on a domain could be helpful (example). I’ve seen people who use Hypothesis on Write.as add that search link as a pinned post for people to look through comments on their blog. I can definitely see a custom tool that pulls together recent Hypothesis comments and puts it into a Write.as post too.

Totally agree with you there @agyild. That’s why we wanted to make sure that there are other commenting solutions on here that are completely free to use, like Utterances and Hypothesis, and want to continue searching for equally free, compatible, and privacy-focused services. If anyone finds anything please let us know.

And we’ll definitely keep your ideas in mind when developing Remark.as and want the conversation to continue about accessible, privacy-first services too. Please feel free to put your input in our dedicated topic on Remark.as:

1 Like