
Setting Up `Giscus` Comments
Configure `Giscus` to enable the comment section in your blog.
· Build
Commenting is an essential part of any blog. It's not just a way to interact with readers — it's also a window into how people are engaging with your content.
That’s why semantic
comes with built-in support for comments.
Enabling comments is simple: Set the comments
value to true
in your post’s frontmatter.
However, since we’re using Giscus, a few extra configuration steps are required. In this post, we’ll walk through the setup process.
What is Giscus
?
While a comment section may look simple, there’s a lot going on under the hood — spam filtering, user authentication, post-to-thread mapping, input forms, comment rendering, and more.
Giscus
simplifies all of this by integrating with GitHub Discussions.
Each blog post is linked to a discussion thread, and comments are stored as replies within that thread. It supports multiple themes and can be styled with custom CSS, giving you full control over the appearance.
It’s a great fit for semantic
.
(Of course, you're free to replace it with another comment system by modifying /src/posts/[slug]/page.tsx
.)
Next, let’s connect Giscus
to your GitHub Discussions board.
Setting Up Giscus
â‘ Install the Giscus
App
First, install the Giscus GitHub App and grant it access to the repository where comment discussions will be stored.
This repository must be
public
for comments to be visible.
We recommend using your forked semantic
repository as the comment store — this keeps your blog and discussion threads in one place, which improves cohesion and maintainability.
â‘¡ Enable GitHub Discussions
By default, GitHub repositories have Discussions disabled.
To use Giscus
, you’ll need to enable Discussions in your repository settings.
Refer to the official documentation here: Enabling or disabling GitHub Discussions for a repository.
â‘¢ Review Your Setup
Once the setup is complete, you can enter your repository path below to verify:
â‘ Enter your repository
Please enter a public repository.
Done!
If you’ve updated the giscus.ts
file using the tester above, make sure everything’s working by adding comments: true
to the frontmatter of your Markdown post.
Need help? Open an issue and we'll be happy to assist you.