9

I've newly added "Discussions" to my GitHub repo for a website I am hosting on GitHub. I've checked the YouTubes and the Googles and can't find anywhere about how to embed your discussions within your website. I had previously used Disqus, which can embed comments within your webpage, but it has terrible walls of advertising cluttering up the interface. It seems like this is something, given the correct commands one could do with GitHub Discussions. I think having users have to exit the site and potentially get lost on GitHub might be a turn-off to your everyday visitor.

Does anyone know if there is a standard way to embed a GitHub Discussion or if not is there some code I can wrap it in which will work like iframe? In which case would there be a way to isolate one discussion thread within the iframe?

Stephen Ostermiller
  • 99,822
  • 18
  • 143
  • 364

1 Answers1

5

Some options that use the GitHub API:

  • https://github.com/giscus/giscus "A comments system powered by GitHub Discussions. Let visitors leave comments and reactions on your website via GitHub! Heavily inspired by utterances." Previously mentioned by Mike Ciffone on a comment As documented at: https://giscus.app/ the steps are:
    • enable a GitHub App
    • enable discussions on your project, possibly creating a giscus category
    • add one <script> to your site
    • done In particular, this supports threaded discussions just like GitHub discussions. Awesome.
  • https://github.com/utterance/utterances "A lightweight comments widget built on GitHub issues. Use GitHub issues for blog comments, wiki pages and more!"

These are really interesting really interesting projects that replace Disquss with a no-Ads no-tracking and well documented API alternative.