No internet connection
  1. Home
  2. Documentation

Embedded comments for Hugo

Quick test if this is for you

You can try out Talkyard at your site, without signing up or installing anything:

  1. Add this where you want the commetns to appear, for example, in ./themes/YOUR_THEME_NAME/layouts/_default/single.html, in a new <section> after the blog post .Content:

     <script>talkyardServerUrl='{{ .Site.Params.talkyardServerUrl }}';</script>
     <script async defer src="{{ .Site.Params.talkyardScriptUrl | default "" }}"></script>
     <!-- You can specify a per page discussion id on the next line, if your URLs might change. -->
     <div class="talkyard-comments" data-discussion-id="{{ .Params.discussionId }}" style="margin-top: 45px;">
     <noscript>Please enable Javascript to view comments.</noscript>
     <p style="margin-top: 25px; opacity: 0.9">Comments powered by
     <a href="">Talkyard</a>.</p>
  2. Add this config value, and use a dummy test comments account:

     // In config.toml:
     talkyardServerUrl = ""

Now, look at the comment section that should appear below your blog posts. You can post test comments but they'll disappear later on, some day (because you use a demo test account). — To change things like the background color or font size, you'd need to create a real account.

Real installation

Do steps 1 and 2 above, then go to the sign up page, and click Sign Up below Blog Comments. Follow the instructions — and, in your config.toml, change the talkyardServerUrl value to the address of your new Talkyard blog comments site, e.g. https://comments-for-(your-blog-address)

You should also add a frontmatter discussionId: per-discussion-id to each blog post / article, so you can change the URL to the blog post, without the discussion disappearing.

Open source

To install Talkyard on your own server (instead of signing up for our hosting), follow these instructions. Then, go to /-/admin/settings/embedded-comments on you own Talkyard server and fill in the address to your blog. At your blog, follow the instructions above (on this page), and set talkyardServerUrl to the address of your Talkyard server.

Ask for help in the support forum or post a comment below.

  • 0 replies