Need for Open Source Comment System for static websites
Current state of blogging
After installing Hugo on this blog I came to the problem of enabling comments. In case you are not aware, Hugo is a static website generator. You write each post as a Markdown file and then run hugo “build” process to generate static HTML.
“What?” I hear you ask. “Static HTML?” I see your lips saying while your eyes increase in size twofold. I have to agree that I also can feel the smell of 90’s when I hear about static HTML. But there are very good reasons why static HTML sites and software like Hugo are becoming popular:
- They are quite different from static HTML from 90’s. Content is the core, not the presentation. For things like blog, or documentation websites, you do not really care about ‘dynamic’ nature of content. You care about having your thoughts out there in most efficient way.
- Blogging on open source platform became overcomplicated. Take, for example, WordPress, amazing story of highly adopted open source piece of software. But to run website on Wordpress you have to run PHP and MySQL. After some time, if you are lucky enough and get enough usage, you need to take care about performance. Options you have here are:
- Installing, configuring and maintaining some sort of caching software, which might have additional dependencies of its own, like Redis, Memached, etc.
- Scaling your Wordpress deployment by adding more servers to run PHP and, eventually, MySQL
- Paying somebody to host everything for you.
All that tech things are interesting, but they create a lot of debt and work. You need to update PHP, MySQL, WordPress, WordPress plugins, PHP modules, OS, etc. Using some hosted platform can be an answer, but brings additional risks and limitations:
- You are relying on provider to keep their things up to date and protect your passwords
- You loose ability to experiment freely
Which can be good trade off for you, but it is not for all people.
At the end, sometime you just want to focus on writing, not technology.
Decline of blogging platforms and tech answer
Long-read as format is currently in decline. Blogger, LiveJournal and others either almost completely forgotten or loosing audience year by year. More and more people are using FaceBook, Instagram and other media to create and read small “snackable” pieces of content.
There is also new products appearing which tries to tackle this issue by enabling authors focusing mainly on text content and forget about tech complexity:
- Medium — amazing platform where text content with some amount of images is main focus
- Static website generators, like Jekyll, Hugo and others. You still have a somewhat trace of technical goodies in terms of templates, and potential scripting, but it is optional and not intrusive. And text is still the king.
This website is currently generated by Hugo, which is some sense reminds me of Golang a little bit. Its like a breath of fresh, clean air after Wordpress. Just write text file with basic formatting (which still supports images, embedding and other things) and generate static html which you can host anywhere without worrying about PHP/MySQL/Apache versions and vulnerabilities.
Why blogs usally need comments
There is one bit of dynamic content which blogs need though: comments. Lets face it, if I just wanted to keep diary I would not need to publish it to internet, I can just leave this markdown file lie on my disk and re-read it when I want.
We want feedback, we want our ideas to be heard and interacted with. We want to interact with other people and get their feedback. This is why blog need comments.
Current solutions for comments on static websites
There are several options of what you can do when it comes to comments on static websites:
- Disqus — were one of the first most successful solution to the problem of comments on static website. They have free option, but for myself I see following problems with them:
- They are changing their plans, you can not be sure that the cost of running would be the same
- They collect data on users who register through them to comment on you blog and use it for monetisation
- In addition to that, they have ads in their free version.
- There is no simple answer “how much it will cost for me to host ad-free Disqus comments” because their plans are tiered by pageviews. So what happens if you have pageviews which are breaking your tier for 2 months?
- They have a history of external links being hijacked by monetising platforms\
- Facebook library for commenting. There is already to much facebook in our lives don’t you think? Plus it does not allow you to comment if you do not have Facebook account
- isso Open Source python based self hosted solution for comments. Seems quite decent and not having external dependencies (using SQLite) but have some drawbacks:
- Does not support multi level of nesting
- Does not have SPAM/CAPTCHA protection
- Python based. I have nothing against python as a language, but sometime when you touch python you have to get touched by virtualenv and other language-specific things, even if you just want to run it
- dyu comments Java based and support multiple nesting levels. Thoughts on this project:
* Seems that it was written as a use-case demo of another library called
protostuffdb
which is developed by same author. It is not clear how much it is product on its own
Conclusion
I was not happy with any of solutions above. This is one of the reasons I decided to write my own simple open source comment system. I will write about this process in this blog, the first post would be about requirements for it.
Update
After I’ve shared this post, Kostya sent shared couple of links of other systems, one the most interested is: Talk, part of Coral project by Mozilla which aim is to create software for journalism. Checking out documentation, here are first impressions:
- It requires 3 server components to run:
- nodejs
- redis
- mongo
- All of above can be easily started if you use docker
- They support realtime updates with WebSockets
- Integration with login through social network
- API support
- Support for plugin development
- Extensibile support for metadata, you can create your own “interactions” for comment, for example your readers can “respect” comment
- Built for more for online media, they started introducing things like comment reputation
- Very actively developed: 2nd Aug (a little bit more than a month ago) they released v3.0, and v 3.4.0 was released 11 days ago.
Its definitely worth looking at Talk, I like that they try to solve the same points (openness, owning of data, simplicity), but I am concerned about the size and number of components in their system. Need to get it up and running to see.