Enable GitHub Discussions, install the Giscus app, copy configuration from giscus.app, and wire NEXT_PUBLIC_GISCUS_* variables into your deployment.
Self-hosted comment systems need a database and spam controls. Giscus stores threads in GitHub Discussions, which is ideal for developer blogs and template users who already have a GitHub repository.
NEXT_PUBLIC_GISCUS_ENABLED=true
NEXT_PUBLIC_GISCUS_REPO=yourname/your-blog-repo
NEXT_PUBLIC_GISCUS_REPO_ID=xxxxxxxx
NEXT_PUBLIC_GISCUS_CATEGORY=Announcements
NEXT_PUBLIC_GISCUS_CATEGORY_ID=xxxxxxxxsrc/components/comments/Giscus.tsx wraps @giscus/react, respects dark mode via next-themes, and maps pathname to discussion threads. Comment.tsx lazy-loads the widget client-side to avoid SSR issues.
Use GitHub’s discussion moderation tools. For public blogs, keep COMMENT_AUDIT-style workflows in GitHub by requiring approval on new discussions if needed.
Update your privacy policy to mention GitHub/Giscus data handling — see src/app/privacy-policy/page.tsx for a starting template.