Ir al contenido principal

Ralsina.Me — El sitio web de Roberto Alsina

Nikola Feature-by-request: tag cloud!

I asked for fea­tu­re re­ques­ts for Niko­la my sta­tic si­te ge­ne­ra­to­r. I got so­me. One was from lon­g-­ti­me user Kay Ha­yen, so I just could­n't say no.

He asked for tag clou­d­s. Look:

An­y­thing in he­re wi­ll be re­pla­ced on bro­w­sers that su­pport the can­vas ele­ment

Cu­te, is­n't it? And it's rea­l, ac­tual tag da­ta from this ve­ry si­te. Wi­th li­nks!

How it's do­ne:

Niko­la ge­ne­ra­tes a JSON fi­le that has the cloud da­ta (tag na­me, si­ze, li­nk), and tha­t's pro­ce­ss­ed by JQue­ry and ta­gCan­vas and ... we­ll, it wo­rks.

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.

Ho­pe you are ha­pp­y, Ka­y, you ma­de me co­de ja­vas­cript, du­de ;-)

It's pro­ba­bly ra­ther "ea­s­y" to make it use any of the­se ins­tead of ta­gCan­vas if an­yo­ne is so in­cli­ne­d.

New in Nikola: slideshows (work in progress)

This is no­whe­re near ready for re­lea­se, 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 (whi­ch wi­ll not look good in RSS):

Mis­sin­g:

  • Cus­­to­­­mi­­za­­tion

  • Su­­pport for sli­­des­ho­­ws that are not ma­­de of ima­­ges

  • Sty­­ling

This is ba­sed on sli­de­js whi­ch see­med nea­t, but I am not 100% su­re it's the way to go (it see­ms to look bad if the ima­ges are not all the sa­me wi­dth, for exam­ple).

Why Use Something Else?

I wro­te a sta­tic si­te ge­ne­ra­to­r, ca­lled Niko­la a whi­le ago, and it's star­ting to get so­me adop­tion and con­tri­bu­tion­s.

I thi­nk it's a fair­ly ni­ce pie­ce of co­de, to be ho­nes­t, and it pre­tty mu­ch does eve­r­y­thing I nee­d. On the other han­d, it's fun to co­de wi­th.

So, if you are using ano­ther sta­tic si­te ge­ne­ra­to­r, or are re­sear­ching in­to it, or just ha­ve opi­nions about it... wha­t's mis­sin­g? What should it ha­ve that it does­n't ha­ve no­w?

No fea­tu­re too sma­ll, no idea too cra­z­y, plea­se sha­re! I pro­mi­se to make a good effort to im­ple­ment any that seem like a good idea :-)

New in Nikola Master: Interactive Console

Ins­pi­red by Djan­go­'s in­te­rac­ti­ve con­so­le, I added one to Niko­la, my sta­tic si­te ge­ne­ra­tor so that if you want to play wi­th its in­ter­nal­s, you can do it ea­si­l­y. He­re's an exam­ple ses­sio­n:

$ 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']

Ha­ve fun!

Son Saqueadores, no Idiotas.

Ayer es­ta­ba pen­san­do acer­ca del sa­queo ani­ver­sa­rio del otro día. No me sor­pren­de que ha­ya sa­queos a su­per­mer­ca­dos el 20/21 de di­ciem­bre por­que bue­no, ha­brá quien quie­ra con­me­mo­ra­r, or­ga­ni­za un sa­queo con los ami­go­s, esas co­sas.

Pe­ro hay al­gu­nas co­sas que no en­tien­do.

La idea de "el gobierno no hace nada"

Has­ta don­de sé, ro­bar un su­per­mer­ca­do no es un de­li­to fe­de­ra­l. Es una co­sa que la ma­ne­ja la po­li­cía de la pro­vin­cia. En­ton­ce­s, el que no hi­zo na­da mien­tras sa­quea­ban en Vi­lla Go­ber­na­dor Gál­vez fue el go­bierno de San­ta Fe ¿no?

O sea, un go­bierno opo­si­tor al go­bierno na­cio­nal es el que le da las ór­de­nes a los po­li­cías que mi­ra­ban mien­tras se ro­ba­ban las co­sas. ¿O aca­so es­pe­ran que ha­ya gen­dar­mes cer­ca de ca­da su­per­mer­ca­do del país y va­yan co­rrien­do a re­pri­mi­r? ¿Si eso pa­sa­ra, no se­ría un aten­ta­do contra la au­to­no­mía de las pro­vin­cia­s?

La idea de que "lo organizó el gobierno"

Es­cu­ché a va­rios de­cir eso. Si el go­bierno na­cio­nal lo hi­zo, son pe­lo­tu­do­s. No creo que lo ha­yan he­cho. Real­men­te, es pa­re­cer­se a De la Rua, y si hay al­go que es­te go­bierno no quie­re es eso, ¿no?

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

FE­LI­CI­TA­CIO­NES SE­ÑOR CHO­RRO. Una de mis mo­les­tias cons­tan­tes con el cho­rro pro­me­dio es la fal­ta de am­bi­ció­n. SI vas a ro­ba­r, la pe­na es la mis­ma no im­por­ta lo que ro­be­s, mas allá de cier­to pun­to. Ro­bar $1000 o $2000000 es más o me­nos lo mis­mo.

Si te­nés ham­bre, ro­ba­te 1 (u­na) ban­de­ja de chu­rras­cos y un LCD. El chu­rras­co es pa­ra mor­far es­ta no­che, el LCD lo ven­dés y co­més un mes (aun­que ha­bría que ana­li­zar el pre­cio de re­ven­ta de un LCD com­pa­ra­do co­n, di­ga­mo­s, 25 ki­los de lo­mo­).

Pre­ten­der que ha­ya una "no­ble­za" en el ti­po que es­tá cho­rean­do un su­per es co­sa de lo­co­s. Co­mo de­cía Ol­me­do, si lo va­mos a ha­ce­r, va­mos a ha­cer­lo bien. Si vas a cho­rea­r, cho­reá bien, cho­reá con ga­na­s, y sé un ex­ce­len­te cho­rro.

En fi­n, que co­mo ca­si siem­pre, las co­sas que la gen­te opi­na no me cie­rran mu­cho.


Contents © 2000-2023 Roberto Alsina