This post is from my blog uzpg.me
Usually, blogs store comment data inside their server database. You can't do that with static websites but there are many tools that can help you solve this problem and create discussion around your posts. This article will guide you through some ways you can add these comments for free.
Utterances is a great comment plugin built on Github Issues. It creates an new issue on github for your posts and then adds your website's comments to said issues. All your commenters need to do is sign in on Github.
Obviously, you should only do this if your blog is about software development or a related subject otherwise none of your readers will have Github accounts.
I love this solution because it's an opensource and lightweight tool that doesn't harm the user experience. It's a simple option and it has a beautiful design which you can see down below:
How to get it setup:
- Create a public "myblog-comments" repository on Github
- Add the app to your repo on the github utterance page
- Paste the following snippet at the bottom of all of your posts:
and replace the repo value with the name of your repository. You can customize this snippet more at the bottom of the utterances website.
<script src="https://utteranc.es/client.js" repo="[username/myblog-comments]" issue-term="pathname" theme="github-light" crossorigin="anonymous" async> </script>
Disqus is a technically free way to add to comments to your website. It's a useful tool but I don't use it because it injects ads into your website if you use the free plan and it raises privacy concerns for its users.
- Register an account at Disqus
- Confirm that you want to install Disqus on your site
- Choose your plan
- On the choose your platform window, select the "Universal Code" option
- Embed the following code at the bottom of your posts:
Remember to replace the page url and identifier parameters with those of your posts. Also replace the s.src "websitename" part with the website name you registered with Disqus. If your site is "example.com", it would be "example.disqus.com/embed.js"
Your comments should now work, but please keep in mind the intangible price of Disqus outlined in this article.
Remarkbox is a simple third-party comment system similar to Disqus which is very easy to implement.
Here's how you can set it up:
- Enter your email in the Remarkbox signup form
- Click the link from the email you should have received from Remarkbox (it might be in spam)
- Follow the instructions on the
setuppage and embed your comment snippet.
Your Remarkbox comments should now be working. This system does not contain ads and respects user privacy more than Disqus but the free plan does not allow moderation and it is a rudimentary solution.
I hope you enjoyed this tutorial and if you encountered any problems with setting things up or if you want to share how you manage this functionality, please comment down below.
You can see more of my blog posts here