Saturday, December 27, 2014

Introducing the Diazo Snippets Library (and less Arcane)


Roughly a year ago today, I wrote a blog post entitled "Diazo theming is great, now we need a snippets library". It is therefore somewhat appropriate that I am able to reveal my first simple attempts at addressing the snippets library problem in a blog post almost exactly 1 year later.

update April 16, 2015:   The Diazo Snippets Library is now available as a Chrome Extension Now available as a Chrome Extension

A Diazo Snippets Library

One year later to the day, we now have a basic Diazo snippets library. You can check it out at

Not much to see, but it scratches an itch I've had for a while. The library makes it possible to locate useful Diazo rules snippets, filtered by different categories, not much more yet.


It all started with Gistbox

To pull this off, I first started aggregating snippets from around the web in Gistbox and also solicited help from others to submit their own snippets.

After shopping around a bit I came upon Gistbox which supported the idea of groups. So I set up a group for Diazo snippets.

The drawback with using Gistbox groups was that the snippets were only available to persons who joined the group. I wanted them to be more public so I set about working on a way to export the snippets. It turns out that Gistbox passes around their data in JSON format, so I was able to "sniff" out the JSON data and export it as a data file.

A new Open Source JS library is born (kinda)

With the help of front-end developer and GIS man +Rhys Allister I set about putting together a static system for displaying the Diazo snippets based on the outputted JSON. From that work we developed a very alpha library with the working title "less Arcane".

One nice spin off of the collaboration with Rhys is that we now have the beginnings of a generic library which can be used to display JSON retrieved from Gistbox.  I like that, being straight JS, it is cheap and trivial to deploy.

Check out Diazo Snippets Library here:
Check out the lessArcane Library code here:

No comments:

Sign up for my upcoming Plone 5 Book & Video tutorials

plone 5 for newbies book and videos