Discourse for commenting, Q&A

Continuing the discussion from Alternative to Disqus Needed More Than Ever:

To reply to a bunch of folks about using Discourse for comments, I used it for commenting on my Hugo site for a few months. It worked really well, but I personally decided I didn’t like blog comments as much as just creating topics manually when I wanted to talk to someone… anyhow, here is how I set it up:

  1. Discourse has a feed associated with a category. This is basic RSS syndication, and you can choose to make the topic in Discourse an excerpt or copy the whole post. It will even update the topic if the feed is updated! Very cool.
  2. The feeds are created and tied to a URL, and you embed a code via a Hugo partial that fills in the URL for the page. Basically how Disqus does it.
  3. It loads comments via JavaScript in the web page. There are buttons to reply, which takes the visitor to the Discourse thread, to login or whatever.

It worked really well. I just didn’t want to take over my Discourse instance with posts, I wanted more collaboration, and currently Discourse doesn’t handle multiple sites well. It is basically a manual process of mapping feeds to categories and allow domains to embed comments, but it is a mess, and doesn’t scale at all.

I removed the Discourse partial, but here it is:

<div id='discourse-comments'></div>

<script type="text/javascript">
DiscourseEmbed = { discourseUrl: '{{ $.Site.Params.discourseUrl }}',
		discourseEmbedUrl: '{{ .Permalink }}' };

  (function() {
    var d = document.createElement('script'); d.type = 'text/javascript'; d.async = true;
    d.src = DiscourseEmbed.discourseUrl + 'javascripts/embed.js';
    (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(d);

Let me know if you have any Discourse-specific questions. :slight_smile:

1 Like

I’ve been looking up on it and it seems Discourse includes the ability to ‘hide’ categories so that your forum wouldn’t get cluttered with things that should have their own home.

The main issue for me is redirecting users to the forum to comment. Its a shame that can’t be set up in a more modular manner that allowed users to comment where they are. I’ve asked in their forums and their reasoning for not building this is that their forum is optimised for community building and they want to bring everyone into it. That’s great but for people with blogs and events in their website it means we have to have a 2nd commenting system and somehow sync notifications and notification settings.

I saw this mentioned in the other thread. I hide lots of categories for various reasons, but I never had an issue with posts from Hugo. I mean, they had their own category by default, but I would often move them to a more appropriate one if it exists.

I don’t think your use case is a majority consensus. I don’t believe there is a majority use case for comments at all; there seem to be about half a dozen models for commenting and user engagement, and I don’t know of any tools that fulfill even most of them.

Discourse works really well for people that want to have conversations. My peeps and me, we build web sites as a service to folks, so the quality of our engagement is what we measure, rather than which domain folks are lingering on. :slight_smile:

Now I just include my email and jabber on each page, and link to a conversation that is relevant in front matter, if I deem a link valuable to the information.

1 Like

Thanks for sharing - that’s very helpful.

Can’t say I agree with this. In-page comments are an excellent way to let people engage with the content. Usage has, its true, dropped off somewhat. I think there are 2 reasons for that. Firstly, the changes being demanded - mainly in the EU - and Facebook et al issues regarding privacy. That has somewhat soured people towards Disqus in some cases even though that is by far the simplest, easiest and most universal tool for in-page discussions.

The second reason for drop-off is the lack of will or common sense by, mainly, news organisations who would rather disable comments rather than deal with the “great unwashed” engaging in sometimes inappropriate dialogue. It is easier to throw news out than engage with it.

Personally, I get very few comments on my much neglected blog. However, when I do get them, discounting the spam, they are tremendously valuable. Engaging in-page is the most sensible approach, keeping the discussion with the content. One of the first times I saw the real value of this was in the PHP help system which had an in-page commenting system allowing direct feedback, examples, enhancements, etc to be suggested as people thought about them and directly in context. Switching tools to make comments breaks the thread of thought.

If you want a more up-to-date example, check out the blog of Pete Scargill at https://tech.scargill.net/ you will quickly see the value that in-page comments bring to his blog. Of course, he is not using Hugo, no Disqus and, in my view, this does somewhat limit the community he has built. The value of his blog is such that it offsets the disadvantages of having to sign-up for yet another discussion site. Sadly, my blog is too neglected due to pressures of work and family life to have that value - perhaps when I retire as he has. :slight_smile:

Thanks again for sharing your workflow however, very useful.

1 Like

I’ve been engaging on meta.discourse forums for a while now. the number of posts for people asking to use discourse as a comments system is staggering. perhaps we should bring everyone together and improve their discourse comments app, or chip in a bit each to crowd fund it.

Then we’d all have an excellent opensource comments system as an alternative to Disqus

1 Like

I’ve been exploring the Discourse option and it seems a fairly modest API upgrade to their current comments plugin would give us all a robust opensource alternative, backed by one of the best open-source communities on the web. Its exactly what everyone here is asking for.

If you want to bring this into reality you can join in the development, or donate a few coins so we can set up a bounty and have it built.

Come over and share your opinions and hopefully coding skills. If enough people join in we’ll all have this tool available by the end of next month!