Self hosted commenting system for blogs or other things.
Tala is a self hosted comments platform for your static blog or whatever.
There's also a WebSocket component that'll make comments appear in real time for everyone currently on the page.
There's is currently no executable or anything. So the easiest way for now is probably to clone the repo using git (or just downloding a tarball):
$ git clone firstname.lastname@example.org:simme/node-tala.git tala$ cd tala$ npm install$ npm start
By default the server will listen on port
You configure Tala by adding a
config.json file to the same directory as
tala.js. In the future there'll be a possibility to change the path to the
The config may include the following keys:
apiKeyis your Akismet api key. More on spam below.
Tala currently uses Akismet to provide spam protection. This requires you to set up an account at akismet.com. There are free accounts available for those who have less then 80 000 comments per month.
You may choose to omit the
spam key from your config in which case no spam
protection will be done at all.
To add Tala to your blog you need to include the client code. This is best
done by adding this code to the bottom of your
Remember to change the
element.src line to point to your Tala server.
What this will do is to wait for the document ready event before loading the comments. For more about this particular techinque you can read this blog post by Patrick Sexton.
You can of course just use a regular script tag and a
src-attribute if you
want to. But that will cause the loading of Tala to delay the loading of your
page. Since your comments probably are below the fold it's probably not super
smart to make your visitors wait!
Then you'll need to tell Tala where to put your comments. This is done by
adding an element, probably a
div with the class
also need to give this element the attribute
data-id. This is used to
separate comments for different articles. The value can be anything but it's
probably smartest to go with the slug of the article or something similar.
Read on for details on how to configure the client.
Tala uses a global (sorry) object to read your preferences. So what you do
is you add another
<script> tag to your page:
These options are mostly used for localization. The available optionas are:
More options and configurability will come with age!
This project is very new and not well tested yet. It should, at least in theory, work in IE8+ and all the good browsers.
As for security not much has been done. It's currently possible to post to the server using any HTTP client available. Which can be done to fill up your server or whatever. There's spam protection from Akismet which should alleviate the problem a bit, but not completely.
There is also rudimentary XSS protection.
If you have any ideas on how to improve this specific part of Tala I'm all ears.
With this said, I'm labeling it 1.0 because I want to. Also, I'm leaving no guarantees or anything! :)
Tala means "to talk" in Swedish.
YES you can. All you need to to is to namespace your
data-id attributes so
that Tala can keep your comments separated.
Hellz yeah! Just open a pull request for any fix/feature you want and we'll talk about it! ;)
This project is licensed under the MIT license.