Doc

Comment System

Comment System Sugam Pokharel

Sugo supports two comment providers: giscus and disqus.

Enable comments globally

Comments are disabled by default. In your root hugo.toml, set:

TOML
1
2
3
[params.comments]
enabled = true
provider = "giscus" # "giscus" or "disqus"

If enabled = false, comments are off site-wide unless you explicitly enable them in a page frontmatter (shown later).

Giscus setup

To use Giscus, you need a GitHub repository with Discussions enabled, and you need the values from giscus.app.

In hugo.toml:

TOML
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
[params.comments]
enabled = true
provider = "giscus"

[params.comments.giscus]
repo = "owner/repo"
repoId = "R_XXXXXXXXXXXXXXXX"
category = "General"
categoryId = "DIC_XXXXXXXXXXXXXX"
mapping = "pathname"
strict = "0"
reactionsEnabled = "1"
emitMetadata = "0"
inputPosition = "bottom"
theme = "preferred_color_scheme"
lang = "en"
loading = "lazy"

The four required values are:

  • repo
  • repoId
  • category
  • categoryId

If any of these four are missing, Sugo will not render the Giscus block.

Disqus setup

In hugo.toml:

TOML
1
2
3
4
5
6
[params.comments]
enabled = true
provider = "disqus"

[params.comments.disqus]
shortname = "your-disqus-shortname"

If shortname is empty, Sugo will not render the Disqus block.

Per-page override

You can disable comments on a specific post even if comments are enabled globally:

TOML
1
2
3
4
+++
title = "My Post"
comments = false
+++

You can also enable comments on a specific post even if global comments are disabled:

TOML
1
2
3
4
+++
title = "My Post"
comments = true
+++

Accepted truthy values in frontmatter are: true, 1, yes, on.

Where comments appear

Sugo renders comments in article-style pages (for example posts). Comments are not rendered for pages marked as:

TOML
1
2
3
+++
type = "page"
+++

and not rendered for content inside the content/pages section.

Share this article

  • X
  • Facebook
  • LinkedIn
  • Reddit
  • WhatsApp
  • Telegram
  • Pinterest
  • Bluesky