TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: giscus – A comments widget powered by GitHub Discussions

4 点作者 laymonage将近 4 年前

1 comment

laymonage将近 4 年前
For the past two months, I&#x27;ve been working on giscus, a comments widget built on GitHub Discussions. It lets you embed a GitHub Discussion to your website, allowing visitors to leave comments by signing in to GitHub.<p>All you need to do is include a small script tag to the page, and it will search for a matching discussion based on the criteria that you choose (e.g. pathname, &lt;title&gt;, etc.), and display the comments for that discussion. If no matching discussion is found, giscus will automatically create one the first time someone leaves a comment. All data is stored in your GitHub repository&#x27;s Discussions.<p>The concept is taken from utterances (<a href="https:&#x2F;&#x2F;utteranc.es" rel="nofollow">https:&#x2F;&#x2F;utteranc.es</a>), a similar project that utilizes GitHub Issues. I initially wanted to fit the Discussions integration into it, but the Discussions API is still in beta and a bit tough to work with. Thus, I decided to create a new project from scratch.<p>Link to the GitHub repository: <a href="https:&#x2F;&#x2F;github.com&#x2F;laymonage&#x2F;giscus" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;laymonage&#x2F;giscus</a>.<p>Here&#x27;s an example of it running on my website: <a href="https:&#x2F;&#x2F;laymonage.com&#x2F;posts&#x2F;giscus" rel="nofollow">https:&#x2F;&#x2F;laymonage.com&#x2F;posts&#x2F;giscus</a><p>Stack: Next.js + Preact, TypeScript, Tailwind CSS<p>Let me know what you think!