Octomments

Octomments

Using GitHub issues as a comment plugin.

Star

87% of my blog readers are using Chrome on desktop. This means that I have the luxury to care less about performance. However, I just recently found that the site has 56 (out of 100) points on Google's pagespeed test. That's not good. The report says that my Disqus comments are blocking the main thread for ~900ms. I want comments on my blog but I also want my users to reach the content as quickly as possible. So, I've made Octomments!.

Documentation · Author · Full story
1️⃣ Go here and install Octomments GitHub App on the repo that will host your comments. The users will authorize this app to comment of their behalf.
2️⃣ Add the following tag on the place where you want the comments to appear: Here Octomments will render the UI.
<div id="comments"></div>
3️⃣ In your page's <head> tag: The Octomments CSS styles.
<link href="https://unpkg.com/octomments/build/ocs-ui.min.css" rel="stylesheet">
4️⃣ Then drop the following code at the end of the page. The Octomments core + renderer. The code initializes the plugin.
<script src="https://unpkg.com/octomments/build/ocs.min.js"></script>
<script>
  Octomments({
    github: {
      owner: 'krasimir',
      repo: 'octomments',
    },
    issueNumber: 1,
    renderer: [OctommentsRenderer, '#comments']
  }).init();
</script>
🎉 And, the result is ...