The progressive adoption of static site generators (or SSGs, like Jekyll or Nikola) for blogs has resulted in many sites opting for centralized, mutually incompatible platforms like Disqus to host their comments (i.e. dynamic content). This adds to the recentralization trend that is plaguing the Internet in the latest years. Colaua tries to offer some integration with a decentralized alternative in the form of GNU social (a.k.a. StatusNet), a federated microblogging system.
About the name
The name of this software is a play on the Nikola SSG, which is named after Nikola Tesla. "Colaua" is an informal version of "Nicolaua" (Nicole) used in Valencia and its whereabouts.
El forn de la Colaua was a popular bakery in the town of Sagunt, in Valencia. Pretty surely some good (and gossipy) conversations took place there!
Using Colaua with Nikola
To make your Nikola site use Colaua to show GNU social conversations in posts,
you first need to prepare it with some files and settings. If you already
have an existing
NIKOLA_SITE directory and a
- Site configuration: edit the
NIKOLA_SITE/conf.pyfile and change the
'colaua'. The value of
COMMENT_SYSTEM_IDis irrelevant to Colaua.
NIKOLA_SITE/files/assets/js/(create this directory if missing); download http://mithril.js.org/mithril.min.js and place it in the same directory.
- Template files: copy the
- Stylesheets: add the contents of the
NIKOLA_SITE/files/assets/css/custom.css(create these directory and file if missing). You may customize the provided styles to your liking.
Whenever you want a GNU social conversation to show up in the comments section of a post, please add to its metadata a field like the following one (in reST notation):
.. colaua-url: https://social.example.com/notice/1234
Where the given URL corresponds to the permalink of the first notice in the conversation. Finally, rebuild your site.
This is not implemented yet:
When Colaua is completed, building a Colaua-enabled post should trigger the automatic creation of a GNU social notice that links to the post.
Using Colaua in an HTML page
to include already existing GNU social conversations in HTML pages.
mithril.min.js and Colaua's
colaua.js (or some
minified version of it if you know how to do that) where they can be served.
Include them in your HTML page:
<script src="js/mithril.min.js"></script> <script src="js/colaua.js"></script>
Then add something like this to the HTML page at the point where you want the conversation to be shown:
URL is the URL of the GNU social conversation you want to include
https://social.example.com/notice/1234). You may have a
look at the sample HTML and CSS files included with the source.
colaua-conversation identifier is recognized automatically and the
given conversation replaces the content of the indicated element. You can
also use several instances of Colaua at different points in the same page
using different identifiers. Just call the
function on each of them:
Colaua.newOnId('IDENTIFIER1'); Colaua.newOnId('IDENTIFIER2'); Colaua.newOnId('IDENTIFIER3'); ...