Better HN
topnewbestaskshowjobs
Log inSign up

laymonage

7 karma · joined May 22, 2021 (5y ago) · 8 submissions

Submissions

comment 5y ago · link · parent

For the past two months, I'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.

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, <title>, 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's Discussions.

The concept is taken from utterances (https://utteranc.es), 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.

Link to the GitHub repository: https://github.com/laymonage/giscus.

Here's an example of it running on my website: https://laymonage.com/posts/giscus

Stack: Next.js + Preact, TypeScript, Tailwind CSS

Let me know what you think!

2.

Show HN: giscus – A comments widget powered by GitHub Discussions(giscus.app ↗)

4 points · by laymonage · 5y ago · 1 comment

comment 5y ago · link · parent

Before I decided to pursue my CS degree and write software for a living, I was afraid that getting stressed from university/work would make me hate programming. One of the reasons that kept me going was because I still try to find the time to make stuff like this. It reminds me how programming can be fun.

comment 5y ago · link · parent

Ha, this might be useful for me. Thanks for creating this.

comment 5y ago · link · parent

That's really cool!

comment 5y ago · link · parent

Nice! Would be even better if you show some kind of a loading spinner while it loads the image, as sometimes it takes a while to show up.

comment 5y ago · link · parent

This is cool! You can do a lot of things with SQLite these days.

comment 5y ago · link · parent

Thank you for your work! It has helped me a lot :)