Comments
Enable comments on yout site's pages. Powered by Giscus and GitHub Discussions.
Requirements
- Your repository must be public
- GitHub Discussions enabled in your repository
- Giscus GitHub App installed in your repository
Getting giscus configuration IDs
Visit giscus.app:
- Enter your repository name
- Select your preferred discussion category
- Find the Repository ID (R_…) and Category ID (DIC_…) in the
script
snippet at the bottom of the page.
Configuration
To enable comments, turn on the "Comments" option in your site's settings in the dashboard.
Then, enter your Giscus Repository ID and Category ID.
Default behavior and customization
By default, comments will be enabled on all pages. You have two ways to customize this behavior:
Hide comments on specific pages
To hide comments on a single page, add showComments: false
to the page's frontmatter:
---
title: Page Without Comments Section
showComments: false
---
Show comments only on specific pages
If you prefer to enable comments only on specific pages, you can:
- Hide comments site-wide by setting
showComments: false
in your site's config file:
{
"showComments": false // Disable comments site-wide (if you want to enable them only on specific pages)
}
- Enable comments on specific pages by setting
showComments: true
in their frontmatter:
---
title: My Page With Comments Section
showComments: true
---
Info
For a detailed guide including examples and step-by-step instructions, check out this blog post.