Skip to main content

Ralsina.Me — Roberto Alsina's website

Nikola Feature-by-request: tag cloud!

I asked for fea­ture re­quests for Niko­la my stat­ic site gen­er­a­tor. I got some. One was from long-­time us­er Kay Hayen, so I just could­n't say no.

He asked for tag cloud­s. Look:

Any­thing in here will be re­placed on browsers that sup­port the can­vas el­e­ment

Cute, is­n't it? And it's re­al, ac­tu­al tag da­ta from this very site. With links!

How it's done:

Niko­la gen­er­ates a JSON file that has the cloud da­ta (tag name, size, link), and that's pro­cessed by JQuery and tag­Can­vas and ... well, it work­s.

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 hap­py, Kay, you made me code javascript, dude ;-)

It's prob­a­bly rather "easy" to make it use any of these in­stead of tag­Can­vas if any­one is so in­clined.

New in Nikola: slideshows (work in progress)

This is nowhere near ready for re­lease, but why not show it?

Niko­la can now turn this:

.. slides::

   /galleries/london-paris-2012/P1000198.JPG
   /galleries/london-paris-2012/2P1000235.JPG
   /galleries/london-paris-2012/3_P1000298.JPG

In­to this (which will not look good in RSS):

Miss­ing:

  • Cus­­tomiza­­­tion

  • Sup­­port for slideshows that are not made of im­ages

  • Styling

This is based on slide­js which seemed neat, but I am not 100% sure it's the way to go (it seems to look bad if the im­ages are not all the same width, for ex­am­ple).

Why Use Something Else?

I wrote a stat­ic site gen­er­a­tor, called Niko­la a while ago, and it's start­ing to get some adop­tion and con­tri­bu­tion­s.

I think it's a fair­ly nice piece of code, to be hon­est, and it pret­ty much does ev­ery­thing I need. On the oth­er hand, it's fun to code with.

So, if you are us­ing an­oth­er stat­ic site gen­er­a­tor, or are re­search­ing in­to it, or just have opin­ions about it... what's miss­ing? What should it have that it does­n't have now?

No fea­ture too smal­l, no idea too crazy, please share! I prom­ise to make a good ef­fort to im­ple­ment any that seem like a good idea :-)

New in Nikola Master: Interactive Console

In­spired by Djan­go's in­ter­ac­tive con­sole, I added one to Niko­la, my stat­ic site gen­er­a­tor so that if you want to play with its in­ter­nal­s, you can do it eas­i­ly. Here's an ex­am­ple ses­sion:

$ nikola init pepe
A new site with some sample data has been created at pepe.
See README.txt in that folder for more information.
$ cd pepe
$ nikola console
Scanning posts
.
.
done!
You can now access your configuration as conf and your site engine as SITE
>>> [p.title('en') for p in SITE.timeline]
[u'Listings Demo', u'Nikola: it generates static', u'Welcome to Nikola',
u'A reStructuredText Primer', u'A reStructuredText Reference', u'Sample
Nikola Config File', u'The Nikola Handbook', u'Theming Nikola']

Have fun!

Son Saqueadores, no Idiotas.

Ay­er es­ta­ba pen­san­do ac­er­ca del saqueo aniver­sario del otro día. No me sor­prende que haya saque­os a su­per­me­r­ca­dos el 20/21 de di­ciem­bre porque bueno, habrá quien quiera con­mem­o­rar, or­ga­ni­za un saqueo con los amigos, esas cosas.

Pero hay al­gu­nas cosas que no en­tien­do.

La idea de "el gobierno no hace nada"

Has­ta donde sé, ro­bar un su­per­me­r­ca­do no es un deli­to fed­er­al. Es una cosa que la mane­ja la policía de la provin­ci­a. En­ton­ces, el que no hi­zo na­da mien­tras saque­a­ban en Vil­la Gob­er­nador Gálvez fue el go­b­ier­no de San­ta Fe ¿no?

O sea, un go­b­ier­no opos­i­tor al go­b­ier­no na­cional es el que le da las ór­denes a los policías que mira­ban mien­tras se rob­a­ban las cosas. ¿O aca­so es­per­an que haya gen­darmes cer­ca de ca­da su­per­me­r­ca­do del país y vayan cor­rien­do a reprim­ir? ¿Si eso pasara, no sería un aten­ta­do con­tra la au­tonomía de las provin­ci­as?

La idea de que "lo organizó el gobierno"

Es­cuché a var­ios de­cir es­o. Si el go­b­ier­no na­cional lo hi­zo, son pelo­tu­dos. No creo que lo hayan he­cho. Real­mente, es pare­cerse a De la Ru­a, y si hay al­go que este go­b­ier­no no quiere es es­o, ¿no?

La idea de "no tienen hambre, se robaron un LCD"

FE­LIC­ITA­CIONES SEÑOR CHOR­RO. Una de mis mo­les­tias con­stantes con el chor­ro prome­dio es la fal­ta de am­bi­ción. SI vas a ro­bar, la pe­na es la mis­ma no im­por­ta lo que robes, mas al­lá de cier­to pun­to. Ro­bar $1000 o $2000000 es más o menos lo mis­mo.

Si tenés ham­bre, ro­bate 1 (u­na) ban­de­ja de chur­ras­cos y un LCD. El chur­ras­co es para mor­far es­ta noche, el LCD lo vendés y comés un mes (aunque habría que analizar el pre­cio de reven­ta de un LCD com­para­do con, dig­amos, 25 ki­los de lo­mo).

Pre­tender que haya una "no­bleza" en el tipo que es­tá chore­an­do un su­per es cosa de lo­cos. Co­mo decía Olme­do, si lo va­mos a hac­er, va­mos a hac­er­lo bi­en. Si vas a chore­ar, choreá bi­en, choreá con ganas, y sé un ex­ce­lente chor­ro.

En fin, que co­mo casi siem­pre, las cosas que la gente opina no me cier­ran mu­cho.


Contents © 2000-2023 Roberto Alsina