Giscus is a lightweight, open-source comment system powered by GitHub Discussions. If your site is hosted on GitHub Pages, this is a very clean and easy comment solution.
What you need
Enable GitHub Discussions
- Open your repository on GitHub
- Go to Settings → General
- Scroll to Features
- Enable Discussions
Once enabled, GitHub will create a Discussions tab.
Install the Giscus GitHub app
Giscus needs permission to create and manage discussion threads.
- Visit
https://github.com/apps/giscus - Click Install
- Choose Only select repositories
- Select your site repository
- Confirm installation
Create a discussion category
Inside your repository:
- Go to Discussions
- Click Categories
- Create a new category:
- Name:
Comments - Type: General
- Description: Page comments generated by Giscus
- Name:
This category will store all comment threads created by your site.
Generate your Giscus configuration
Go to the official setup page:
Fill out the form:
-
Repository
yourname/yourrepo -
Page ↔ Discussion mapping
Discussion title contains page pathname -
Discussion category
Comments -
Features
- Reactions: optional
- Emit metadata: disabled (recommended)
Once filled out, the page will generate a <script> tag.
Copy values into _config.yml
Instead of pasting the script directly into your layout, this theme pulls all Giscus configuration from _config.yml.
Add (or update) this section:
# -------------------------------------------------
# Comments (giscus)
# -------------------------------------------------
giscus:
enabled: true
# From giscus.app → Repository
repo: "YOURNAME/YOUR-REPO"
# From generated script → data-repo-id
repo_id: "REPO_ID_FROM_GISCUS_APP"
# From giscus.app → Discussion category
category: "Comments"
# From generated script → data-category-id
category_id: "CATEGORY_ID_FROM_GISCUS_APP"
# Page ↔ Discussion mapping
mapping: "og:title"
# Optional UI behavior
reactions_enabled: "1"
emit_metadata: "0"
input_position: "bottom"
lang: "en"
Enable comments per post
Comments are opt-in.
Add this to any post/page front matter:
comments: true
The theme automatically renders Giscus at the bottom of the page when this flag is present.