HUGO

Graph Comment setup in 2 Minutes

Graph Comment to me looks a bit less cluttered than Disqus. The free tier has a good range of functions, with a dashboard on their server.

Integration with Hugo (even for me) just took a few Minutes.

Prerequisite: You have a Graph Comment account (it’s free) and you setup your domain on the Graph Comment dashboard.

  • On Graph Comment go to My Sites > Setup > Universal Code
    Copy the code:
<div id="graphcomment"></div>
<script type="text/javascript">

  /* - - - CONFIGURATION VARIABLES - - - */

  var __semio__params = {
    graphcommentId: "YOUR-ID-HERE", // make sure the id is yours

// some lines deleted to keep it short here

    (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(gc);
  })();
  

</script>
  • In HUGO create a new file \layouts\shortcodes\graphcomment.html
  • Paste the complete code with all tags into the graphcomment.html
  • On your *.md page simply add {{< graphcomment >}} where you want the comments to appear

That’s all. SPAM bots seems not to know Graph Comments (yet).

You can import comments from Wordpress (on Wordpress with their plugin). It works also on local host. Post/page URL can be edited on their dashboard, in case you move from Wordpress to Hugo and some permalinks change.

6 Likes

Much better than disqus :+1:

Still produces console error, like a lot of iframes.

In my case, this one: