Ir al contenido principal

Ralsina.Me — El sitio web de Roberto Alsina

Publicaciones sobre python (publicaciones antiguas, página 94)

Nicoletta: Nikola's little sister

Ano­che ví es­te post de Ja­mes Har­ding ex­pli­can­do co­mo ha­cer un blog es­tá­ti­co sim­ple usan­do Fla­sk.

Me pu­so a pen­sar... se­ría di­fí­cil ha­cer al­go pa­re­ci­do con la me­nor canti­dad de de­pen­den­cias po­si­ble­s? Y cuán­to có­di­go se­ría?

Así que en vez de des­ayu­nar y al­mor­zar me to­mé un ca­fé y me co­mí un san­dwi­ch, y acá es­tá Ni­co­le­tta un blog es­tá­ti­co mi­ni­ma­lis­ta.

Las de­pen­den­cias so­n:

¿Y cuan­to có­di­go fue? Ha­bía es­ti­ma­do 25 LO­C, le erré por mu­cho: fue­ron 40. Po­dría ha­cer un po­co de tram­pa pa­ra achi­car­lo, pe­ro ... ¿Pa­ra qué?

El có­di­go es­tá en gi­thub y de­be­ría ser en­ten­di­ble. Si no lo es, pre­gun­ten acá en los co­men­ta­rio­s.

Nikola 6.0.0 released

Fi­na­ll­y! This took a whi­le be­cau­se the­re was a lot of wo­rk do­ne, but re­lea­se 6.0.0 of Niko­la my sta­tic si­te and blog ge­ne­ra­tor is ou­t.

De­tail­s, fi­le­s, etc at gi­thub

I ha­ve trie­d, for this re­lea­se, to do things be­tte­r, be mo­re ca­re­ful and do­cu­ment as mu­ch as po­s­si­ble, as we­ll as tried to hit most things that we­re hard to fix in a sin­gle ba­ckwar­ds in­com­pa­ti­ble break.

So­me of the new fea­tu­res are des­cri­bed in a se­ries of blog pos­ts: 1 2 3 4 5

Al­so: brand new mo­dern the­mes si­te: http://­the­me­s.­ge­tniko­la.­com and new do­main http://­ge­tniko­la.­com among many other tweaks.

Ha­ve fun!

Magic Mystery Forum Revisited

A long ti­me ago I wro­te a ha­ckish mi­ni­ma­lis­tic fo­rum so­ftwa­re, whi­ch us­ed Dis­qus as a ba­cken­d. Just to see if it sti­ll wo­rked after 2.5 year­s, I took a look... and it sort of di­d.

So, sin­ce I know mu­ch mo­re about web­si­tes now than I did ba­ck then, I clea­ned it up a li­ttle and de­plo­yed it at http://­fo­ru­m.­ral­si­na.­me

Mos­tl­y, what I ha­ve lear­ned in tho­se 2.5 years is that boots­trap and JQue­ry are cool, and he­re is the be­fo­re/a­fter ima­ge so you can see wh­y.

And ye­s, it's sti­ll 32 li­nes of co­de. I re­mo­ved a co­m­ment be­cau­se Dis­qus wo­rks be­tter now and the rest is all tem­pla­te chan­ges, do­ne using http://­je­ts­tra­p.­com

/galleries/random/before-after.thumbnail.png

New in Nikola v6 part V: LESS is more

I am plan­ning to do a ma­jor re­lea­se (ver­sion 6!) of Niko­la my sta­tic blog and si­te ge­ne­ra­tor the next weeken­d. It's a ma­jor ver­sion be­cau­se the­re has been a ton of fea­tu­re wo­rk do­ne. So, I wi­ll do a qui­ck se­ries hi­gh­li­gh­ting so­me of tho­se im­pro­ve­men­ts this week.

Today's Topic: LESS

Un­le­ss you are ha­ppy wi­th your si­te looking like strai­ght boots­trap (and you rea­lly should no­t) CSS goes a long way to­war­ds making your pa­ges look just the way you want them to.

The bad part is tha­t, if you ha­ve do­ne any CSS you wi­ll know CSS is a rea­ll­y, rea­lly cra­ppy "lan­gua­ge". Tha­t's why a who­le phi­lum of tools has been created that take a mo­re po­wer­ful syn­tax and ou­tput CSS.

Niko­la now has su­pport for one of the­s­e, ca­lled LE­SS (al­thou­gh adding su­pport for others like SASS should be ve­ry ea­s­y).

So, how does it wo­rk?

  1. In your the­me, put LE­SS fi­les in the le­ss/ fol­de­r.

  2. Crea­te le­ss/­tar­ge­ts and put the­re the fi­les that should be com­pi­led using le­ssc, one per li­ne.

  3. The­­re is no step 3

Nikola will automatically build output/assets/css/foo.css out of theme/foo/less/foo.less and will even support the usual theme inheritance, so if there ever is a LESS-based theme out there, you can just tweaks the files you want.

I per­so­na­lly am not wri­ting that hy­po­the­ti­cal LE­SS-­ba­sed the­me, but I am mo­re than ready to help whoe­ver wan­ts to do one.

New in Nikola v6 part IV: Awesome Auto Mode

I am plan­ning to do a ma­jor re­lea­se (ver­sion 6!) of Niko­la my sta­tic blog and si­te ge­ne­ra­tor the next weeken­d. It's a ma­jor ver­sion be­cau­se the­re has been a ton of fea­tu­re wo­rk do­ne. So, I wi­ll do a qui­ck se­ries hi­gh­li­gh­ting so­me of tho­se im­pro­ve­men­ts this week.

Today's Topic: Auto Mode

Niko­la has ha­d, sin­ce day one, a way to run in "au­to mo­de". That means that it would re­build the si­te au­to­ma­ti­ca­lly when it saw a fi­le chan­ge. That was pro­vi­ded by doit the cool so­ftwa­re that hand­les niko­la's ta­sk tree.

The pro­blem was that it was sli­gh­tly li­mite­d, and it did­n't no­ti­ce con­fi­gu­ra­tion chan­ges, or when you added new fi­le­s. It on­ly reac­ted to chan­ges in things it al­ready knew as de­pen­den­cie­s.

We­ll, in v6, Niko­la has a new au­to mo­de cour­tesy of Py­thon Li­ve­re­load that fixes all tha­t.

I thi­nk the best way to show it is wi­th a vi­deo, so he­re it is (the­re are ty­pos and su­ch, just see the big pic­tu­re ;-):


Contents © 2000-2023 Roberto Alsina