Navigation
Print Share Copy URL
Breadcrumb

Configure Discussion

How to configure post discussion in Hugo Brewm theme

Configure Giscus Comments

To enable Giscus comments on your Hugo site, follow these steps:

  1. First, install the Giscus GitHub App on your repository
  2. Add the following parameters to your config.toml:
[params.giscus]
    repo = "username/repository"
    repoID = "R_kgDxxxxxxxx"
    category = "Announcements"
    categoryID = "DIC_kwDxxxxxxxxxxxxxxxx"

Replace the following values:

  • repo: Your GitHub username and repository name
  • repoID: Your repository ID (get from Giscus website)
  • category: The discussion category name
  • categoryID: The discussion category ID (get from Giscus website)

You can generate these values by visiting Giscus.app and configuring your preferences. The following parameters can be optionally configured:

    mapping = "pathname"
    strict = "0"
    reactionsEnabled = "1"
    emitMetadata = "0"
    inputPosition = "bottom"
    theme = "preferred_color_scheme"
    loading = "lazy"
  1. By default, Giscus comments will appear on all posts. To disable comments on specific posts, use the front matter parameter:
---
comments: false  # Disable comments for this post
---

Configure Social Media Integration

The theme supports embedding comments from Bluesky or Mastodon or both social platforms. When you include links to your Bluesky or Mastodon posts in the front matter, the Giscus will be automatically replaced.

Linking discussions with Mastodon post

Link your Mastodon post URL to the front matter using either toot, mstd, or mastodon parameter.

---
toot: https://example.com/@example/12345678901234567890
---

Linking discussions with Bluesky post

Link your Bluesky post URL to the front matter using either skeet, bsky or bluesky parameter.

---
skeet: https://bsky.app/profile/example.com/post/12345678901234
---

Note: You may need to estimating the article’s permalink on your local preview before sharing on Fediverse platforms to obtain the post link, or you might need to run CI/CD operations twice.


Discussion