Comments are back!
In the move to Hugo from Wordpress, one of the things I left behind temporarily was commenting.
While the blog doesn’t get a ton of comments, I do still occasionally hear from someone who finds a post, sometimes even a very old post, useful, and that’s an interaction I wanted to make possible on the new Hugo-based blog.
Since Hugo provides support for Disqus out of the box, I figured it was a good place to start.
Some compromises
There are a couple of compromises that I accepted as a result of this choice. One is that for older posts that already have comments, there will be a mix of the old, imported comments which are now basically just static content, and the new Disqus-based comments.
Another is that, given the relatively low volume of traffic the blog receives, and the low volume of comments, it doesn’t make sense to pay for even the minimal tier of Disqus paid…the downside of which is that ads will appear for readers without a good ad-blocker running (I use router-based adblock lists and so far I’m not seeing anything on my devices).
Understandable that Disqus wants to make some money for a service they offer, but I also know that may be a frustration for some.
I’d definitely like to hear from anyone in the comments (irony alert!) if you feel strongly about the choice of Disqus as a commenting option. I know Hugo supports a number of other options, but few of them are as easy to configure…well, at least in theory.
Configuring the “built-in” Option
As mentioned above, Hugo has a built-in provider for Disqus comments. So in theory, it should have been really easy to configure.
However, one of the things I am finding with Hugo is that theme creators sometimes do their own thing when it comes to configuration, and one example is the Stack theme I use, which (I think) attemps to “simplify” the configuration of Disqus down to a single parameter, disqusShortname, which contains the Shortname obtained when you sign up for a Disqus publisher account. Easy enough, right?
Except that didn’t work for me. So after several iterations and attempts, what I found that worked for me was having the disqusShortname parameter at the root of my config.yaml, along with the following in the params section:
params:
comments:
enabled: true
provider: "disqus"
With that, Disqus started showing up.
For me, at least (YMMV), comments are enabled by default for all posts and pages, but if you want to disable comments for a post or page, you can add
comments: false
to the frontmatter of the post.
Your thoughts?
While it took a little longer than I’d hoped, I’m hoping that bringing back comments will make the blog less one-way, and more of a conversation. And hopefully that will encourage me to write more, and more often!
Would love to hear your thoughts.