Giscus powers comments on this portfolio using GitHub Discussions, giving readers a way to leave feedback, ask questions, and react to projects without ever leaving the GitHub ecosystem. Because Giscus stores comments as Discussion threads in your repository, you own the data, there are no third-party tracking scripts, and moderation is handled entirely through GitHub’s existing tooling. This guide walks you through enabling Discussions, configuring Giscus, and embedding the comment widget into your pages.Documentation Index
Fetch the complete documentation index at: https://github-52.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Before configuring Giscus, confirm the following:- Your repository is public — Giscus cannot read Discussions from private repositories
- You have admin access to the repository to enable the Discussions feature
- You have a GitHub account (visitors will also need one to comment)
Setup steps
Enable GitHub Discussions on the repository
Navigate to your repository on GitHub and open Settings → Features. Scroll down to the Discussions section and check the box to enable it. GitHub will create a Discussions tab in your repository navigation. Once enabled, you can create categories to organize comments by topic.
Visit giscus.app and configure your repository
Open https://giscus.app in your browser. In the Repository field, enter your repository in the format Giscus will verify that the repository is public and that Discussions is enabled. If the check passes, a green confirmation message appears and the configuration form unlocks.
owner/repo, for example:Select a Discussion category
In the Discussion category dropdown, choose an existing category or create a dedicated one. For portfolio comments, creating a category named
Comments keeps project feedback separate from general repository Discussions. To create the category:- Go to your repository’s Discussions tab.
- Click Manage categories (pencil icon on the right).
- Click New category, name it
Comments, choose the Open-ended discussion format, and save.
Comments from the dropdown.Choose the page-to-Discussion mapping
Giscus needs to know how to associate each page with a Discussion thread. The available mapping options are:
For a static GitHub Pages site, pathname is the most reliable choice because paths are stable even when the domain changes.
| Option | How it works |
|---|---|
pathname | Uses the URL path (recommended for most sites) |
URL | Uses the full URL including query parameters |
title | Uses the page <title> element |
og:title | Uses the Open Graph title meta tag |
Copy the generated script snippet
After completing the configuration form on giscus.app, the page generates a Replace
<script> tag at the bottom. Copy it in full — it includes your repository ID and category ID pre-filled. The snippet looks like this:YOUR_REPO_ID and YOUR_CATEGORY_ID with the actual values shown on giscus.app — these are unique identifiers that Giscus uses to create and retrieve Discussion threads for the correct repository and category.Embed the script in your page template
Paste the copied After saving and pushing this change, visit any page of your portfolio and scroll to the bottom to confirm the widget loads.
<script> tag into your HTML template at the location where you want the comment widget to appear — typically near the bottom of the page content, after the main article body. Place it inside the shared page layout or template file that wraps your project pages:Visitors must sign in with their GitHub account to post a comment or add a reaction. Visitors who are not signed in will see the comment widget but will be prompted to authenticate via GitHub OAuth before they can interact.
Managing comments
All comments submitted through Giscus appear as replies inside the corresponding Discussion thread in your repository’s Discussions tab. You can moderate, edit, pin, or delete comments directly from the GitHub Discussions UI. You can also lock a Discussion thread to prevent further comments on a specific page.Related setup guides
Deployment
Deploy the portfolio to GitHub Pages and configure Cloudflare.
Troubleshooting
Fix common issues including Giscus not loading.