A very simple Sinatra application for serving blog or article comments.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Simple Blog Comments

Simple Blog Comments is a very simple Sinatra application to serve a very simple, linear set of comments over a bunch of pages. This can be integrated into your blog or CMS by including the comments.js script and annotating an element with the ID "comments".

For example, in the content of your page:

  <div id="comments"><em>Comments loading...</em></div>

And towards the end:

<script src="<%= url_to('js/jquery-1.9.1.min.js') %>"></script>
<script src="<%= url_to('js/jquery.timeago.js') %>"></script>
<script src="<%= url_to('js/comments.js') %>"></script>
  $(document).ready(function() {
    loadComments("#comments", "comments.json");

Note that this requires JQuery and the timeago plugin.

Finally, you will need to edit the comments.rb file, as there are some constants defined at the top which reference places on the filesystem to find static files, or put comment entries.