Dhiren Audich Software Developer | Apprentice Polymath | Data Science Enthusiast

Comparison of Various Commenting Systems for Jekyll

Jekyll has been lauded for its speed, simplicity, and security. However, one of the drawbacks of it is that it doesn't have a native commenting system. Considering that this was designed with blogging in mind, one would assume it would have one. Fortunately, because Jekyll is directed towards a more tech savvy crowd, there are a lot of hackers out there who have either designed and built or hacked and configured a commenting system that plays nicely with Jekyll.

Here I present my own findings on this issue...

Requirements

To have some criteria for my analysis, here are a few things I look for from a good commenting system:

  • Easy to install and configure
  • Licensing, fees & price
  • Ownership of the data
  • Security
  • Functionality
  • Longevity

Contenders...

1. Disqus/Livefyre/Intense Debate

The standard advice given to anyone that is planning on hosting a Jekyll blog is to use Disqus, or some other similar service as done by Octopress.

  • All three involve injecting JS into your site. So they fairly easy to install.
  • All three of these services provide free basic service. Livefyre and Intense Debate do have additional paid features, but they are designed for larger organizational entities.
  • In all three circumstances the parent company reserves the right to distribute, and reproduce any content that either you or anyone else posts to your account.
  • Each service offers free spam and authentication services.
  • Rich interfaces and lots of functionality all around. Unfortunately, you are still stuck with styling around the embedded form.
  • Some of these companies have been around for a while now, and they all offer data export feature.

2. Github/Facebook Comments

Another popular option for having a commenting system with authentication is to use either Facebook's or Github's widget like service. While most of the features are exactly the same as the previous contenders the primary difference between them is that Github/Facebook require the user to be a member on their site as opposed to something like Disqus which allows you to log in with multiple ids.

  • The primary downside to these is that you are limiting the discussion on your site to only a handful of participants (those with Github and Facebook accounts).
  • The data is not owned by you, it is saved on Facebook/Github servers.

3. Juvia

Juvia is an open source commenting system that allows you to run your own server and inject JavaScript bits into your website. It uses AJAX for its calling. It claims to have been created in a way that it doesn't conflict with existing JavaScript on the page. But when I tried to install this on my own site, I found some conflicts. I reported them on the official bug tracker on github but couldn't get any help on it, so I abandoned trying to get it working after some struggle.

I did, however, get the server portion installed and working. It was quick but had to play with the gemfile a little bit to get it to play nice with my hosting service. Too bad the JS injection didn't work. But there are plenty out there who do have all the pieces working. Some of the salient features of this system:

  • Fairly easy to install (hit and miss for me), might need help troubleshooting or re-configuring.
  • Open source, hence no fees. You can implement your own features if you want.
  • Data is owned by whomever owns the server (Terms Of Service) on which you are running the server portion of the program.
  • The software does support Akismet, and seems to sanitize input.
  • It comes with all the basic features that you can expect from any commenting system, but anything more niche, you might have to write your own features.
  • This is always hard to tell for open source projects. If you are a contributor then the correct answer is as long as you contribute. Otherwise you are at the mercy of the active developers.

4. Static Commenting System

The final system I tried was the static commenting system. The rhetoric for a static commenting system can be found on Matt Palmer's blog post. You can find the actual system here. Unlike the other systems that I have reviewed this one is a bit of an odd one out. Simply because there isn't anything dynamic going on. Just a plain php script that sends the comment to an email address. One of the salient points of this system is that the php script actually formats the message to YAML format, so once you approve the email you can just copy paste the YAML matter to the comments folder and the ruby script places it in the correct post on site generation.

  • Easy to install but can be time consuming. Adding the php script and the ruby hook is quick but the form isn't styled at all. It also neither responsive nor accessible out-of-the-box.
  • The project is open sourced so it is free as in beer+speech.
  • Whomever owns your mailing account technically own the data as determined by the TOS.
  • You act as your own spam filter. No database hence SQL injections. As long as you have your file permissions set correctly, there should be no XSS security vulnerabilities. You might want to add a phantom text field for validating input to avoid scripted spam attacks.
  • Apart from the basic form and submit, anything you might want to develop.
  • As long as php is alive (sigh).

Conclusion

In this post I had set out to explore various alternatives for a commenting system that would be suitable for a static website generator like Jekyll.

This is purely subjective, but I feel that if you are investing in a static site generator and prefer Markdown files to databases. Then you might as well invest some time and either create your own commenting system (I tried) or use an open source system and hack it to your liking. Since this is a personal blog and I am not expecting a flood of time-sensitive long discussions I decide to use the static system. This also eliminates the time I would have wasted in trying to administer a database and/or creating yet another account on the internet and sharing my personal information with. Additionally, it reduces the amount of dynamic code that runs on my site affecting the page loads.

In the end its always about compromise and necessity. If in the future I find that the number of comments submitted to the site are more than I can safely handle then maybe I will spend some time investigating a dynamic commenting system. Until then this will do.

Notable Mentions:

Systems that I did not check because of various reasons, but I thought I should still mention them:

Social Media: Archiving Human History

This post was originally posted on another blog that I maintained for my 'Computers and Society' class.

I recently read a very interesting blog post written by Mashable‘s former co-editor Ben Parr titled “5 Ways Social Media Will Change Recorded History” and found my mind wandering the possibilities. But that was short lived as I came across another article that counter argues the Ben’s position written by Tom Scheinfeldt titled “Archiving Social Media“. Pay special attention to the comments section for the second blog, the arguments are worth the read. The comments made me think, so here I decided to weigh in my opinion.

Preamble

Now I am not a philosopher, sociologist or anthropologist, however I do know that as humans we like to be remembered. Most of us try to achieve something in life that someone someday will look back and revere.

For most part of our human story, we have very little recollection of what happened in the past. Most of the historical sources are scant and tainted with propaganda, folk tales, etc, which tend to obscure our vision of our ancestors. We only have written sources for the larger and more prominent events like Napolean’s campaign in Russia, Alexander’s death in Persia, etc. We don’t quite know how a common man would have lived in that time period. Of the occasional diaries, travel logs, and essays, they usually belong to diplomats or artisans who travel on some Emperor’s orders. They are insufficient to piece together an average day in the life of a common man.

This has drastically changed since the late 19th and 20th centuries. Higher literacy rates and technological improvements meant that writing was more affordable and possible. Major revolutions, civil wars, and world wars took place in this time frame. Unlike previous wars, accounts survive of not only military records but also personal records of the soldiers and officers that fought in them. Newspapers became more prominent means of information dissemination about daily goings and comings. Photography and motion pictures became cheaper and affordable. We can not only read about how people lived, but also experience their lives through their movies and pictures.

Here is a very interesting talk given by Daniel J. Cohen on the topic of “New Directions in Digital History” that ties well into this topic.

The Internet Revolution

The advent of the Internet has meant that we are able to share information faster and seamlessly across political and cultural boundaries. Multiple websites whose core goal is to build communities, for profit or otherwise, have been very successful in bringing people together. This social aspect of their business has meant that people are able to share their thoughts, ideas, and feelings more freely- now excessively.

Twitter updates, Facebook status changes, LinkedIn job postings, Instagrams, etc, have made it possible for the common man to not only document his entire life but also disseminate this information to almost anyone that wants to access it. The ethical and social implications of this phenomenon is beyond the scope of this post, so I will skip it. But what is clear is that for the first time in history, we can construct a person’s life by piecing together their daily interactions from birth to death.

Apart from personal accounts, companies, governments, and other organisations (including the Government) too have started to utilise social media for marketing, promotional, and announcement purposes. All of this information gets stored across thousands of data farms across the globe in the form of 1s and 0s. In other words, snapshots of human history being stored on a second by second basis.

The History of Social Networking

Infographic image:

Social Media History

Data Mining

One of the most important ways how the online data can be harvested is through data mining techniques. For example, the Center for Disease Control recently tried to track down and understand how the flu virus spread using Google Trends.

There are websites entirely built on collecting links, photographs, videos, etc, supplied by visitors pertaining to important events in modern history. They can be either big or small. e.g. 911digitalarchive, hurricanearchive, etc.

Whilst these sites rely on the users to gather and post information, sites like Twitter provide mechanisms (hashtags) for easy information retrieval pertaining to a particular subject. Google also has a product called News which tracks the latest press releases from various media outlets.

Utilising all of these tools one can make important and informed decisions. For example, if you are investing it might be worthwhile to spend time in gathering information about the company’s blog, Twitter feed, Facebook page, news articles pertaining to that company, the field in which that company operates, etc. Since the Internet has allowed fast up-to-date information, even though it might not be accurate, it is enough to get a clearer picture as to where the company might be heading in the future.

One of the most recent events where social media played a very big role is the Arab Spring explored more in an article described by AlJazeera titled “Taking power through technology in the Arab Spring“. Despite the fact that the Spring is over, the posts and the images, and the raw day-to-day data still survives. The news from the recent civil war in Syria is another such example, where civilians and the fighters (from both sides) are posting videos and news daily to capture the effect of war in that state. I sometimes wonder if and how the outcome of previous conflicts and wars would have been different under these conditions where every side’s action was recorded and analysed over and over again.

In a similar fashion, we can construct a person’s life using similar methods. What interests me most is that what would happen when someone from around my generation stands for prominent positions in the government and other organisations? Will their digital footprint haunt them? Past friendships, associations, etc., be drawn and quartered to the point where it might be considered harassment?

One of the recent NSA internal document leaks describe how gathering data on internet habits of prominent Muslim radicals were used to intimidate them and silence them.

The Future

Whilst all the arguments that I have presented seem to suggest that archiving social media is inherently good, my only concern is that we still have a lot of work to do in this field. For instance, someone has to process and judge the quality of the data that is being used, and ignore the noise of mundane events. A video clip from the movie “Easy A” clearly demonstrates this (not owned by me and no copyright infringement intended):

To conclude, I see the future of this vast information wasteland (the Interent) as more like a graveyard of unstructured and unformatted data. A museum piece in the museum of human history. Another opportunity to learn about human beings, squandered, due to the plight of privacy statements and organisational red tape. But as with everything else, there will some improvements that I am sure of, but they will be most likely be in the form of more annoying ads on every web page I visit, waiting to be blocked by ad blocker. Being an information-phile (is this even a word?), I fear that we will lose more records about our current events, as technology races to replace paper and traditional media; i.e. digital bits lost due to incorrect storage and computer failures. If I leave this post online untouched, it will most likely not exist in a decade’s time. But then again is this post worth preserving?

Cleaning up Linux Filesystem

I am currently dual booting LMDE with Windows 7 on my laptop. Since I am using Windows 7 primarily for gaming purposes, I have allocated most of my HDD space to it and about 120GB to the linux partition. I have a second HDD (250 GB) with all of my personal data on it for linux only.

However, since all of the linux packages reside in root directory, everything goes to the tiny 120GB partition; causing it to "fill up" every now and then. This gives rise to the following error:

Error message for low disk space

To combat this linux has an in-built cron task that clears up the log data and other clutter on a daily basis. For whatever reason this sometimes just stops working!?

Until I am able to debug why, here are a few steps that I take to clear some disk space:

Note: These steps should work for all Debian and Debian based systems including Ubuntu, Linux Mint and LMDE.

  1. Cleaning up old and unnecessary package files.
  2. sudo apt-get autoclean
    sudo apt-get autoremove
    
  3. Once that is done another thing to do is to manually run the cron task and then delete the tarballed files:
  4. sudo /etc/cron.daily/logrotate
    
    Note: the logrotate takes a while to run, so don't panic if your TTY hasn't returned.

    Once that is done, you can easily remove the unnecessary log files:
    sudo rm /var/log/*.tar.gz.1
    sudo rm /var/log/*.log.1
    
  5. Okay, this one is obvious, clean up your Trash bin.

Additionally:

  • You might also want to clear your browser cache, cookies, temp files and history.
  • Unnecessary downloaded files (if you have a default Downloads directory set) also tend to take up too much place.

Et voila! Just doing the above steps have, in the past, saved me over 70GB sometimes. Depends on the duration between the logratates.

Happy disk saving!

Say hello to my blog!

First Post

So I have been meaning to launch my own site for quite a while but just had other priorities(excuses?).

The primary reason for creating this blog is to create a place for mental floss; somewhere where I can pen my thoughts. It is also a place to document some of solutions that I discover on a daily basis so that I don't have to rediscover them everytime. Finally, its a place to share anything else that I want to share with the world.

Hope you find some of this useful.

Cheers!