28 Dec 2012 ralsina   » (Master)

Nikola Feature-by-request: tag cloud!

I asked for feature requests for Nikola my static site generator. I got some. One was from long-time user Kay Hayen, so I just couldn't say no.

He asked for tag clouds. Look:

Anything in here will be replaced on browsers that support the canvas element

Cute, isn't it? And it's real, actual tag data from this very site. With links!

How it's done:

Nikola generates a JSON file that has the cloud data (tag name, size, link), and that's processed by JQuery and tagCanvas and ... well, it works.

You have to add jquery.tagcanvas.min.js somewhere and embed a whole pile of raw HTML (see here for details) but hey, it works.

Hope you are happy, Kay, you made me code javascript, dude ;-)

It's probably rather "easy" to make it use any of these instead of tagCanvas if anyone is so inclined.

Syndicated 2012-12-27 22:31:23 from Lateral Opinion

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!