Ir al contenido principal

Ralsina.Me — El sitio web de Roberto Alsina

Publicaciones sobre nikola (publicaciones antiguas, página 16)

Lunchtime Nikola Feature: graphviz

Sin­ce we are in the pro­ce­ss of adding a plu­gin re­po for Niko­la, I wanted to add a sim­ple plu­gin the­re so that we can show how it wo­rks.

So he­re it is. You use this:

.. graphviz::

   digraph foo {
       "Idea" -> "tap tap tap" -> "Code";
   }

And you get (a­s­su­ming gra­ph­viz is ins­ta­lle­d, and this plu­gin is ins­ta­lle­d, etc.) this:

Leer más…

Trivial Nikola Deployment Using Pancake.io and Backlift

So, you want to pu­blish a si­te and want to do it no­w? As in, rea­lly ri­ght no­w? And for free? And you are a Niko­la use­r.

If you are a Dropbox user, open an account at Pancake.io Then set your OUTPUT_DIR to something like /home/yourname/Dropbox/Apps/Pancake.io and build. That's it. No deploy step.

Or open an account at Backlift and set OUTPUT_DIR to /home/yourname/Dropbox/Backlift/foo where foo is your site's name as configured in Backlift. Build. No deploy step.

Or open an ac­count on Dro­pPa­ges.­com or KISSr or Si­te44.­com or just use a Dro­pbox pu­blic fol­de­r.

Ea­ch of the­se ser­vi­ces has ad­van­ta­ges and di­sad­van­ta­ges, from la­me URLs to cos­ting mo­ne­y, but he­y, for a qui­ck thing they are cool. You can alwa­ys upgra­de to the real thing la­te­r.

Being an Inclusive Project (and how GitHub saved my day)

I ha­ve pos­ted over 50 pos­ts he­re about Niko­la and most of them con­tain so­me­thing like "Niko­la, my sta­tic blo­g/­si­te ge­ne­ra­to­r". We­ll, tha­t's not the ca­se an­y­mo­re. From now on I wi­ll say "a sta­tic blo­g/­si­te ge­ne­ra­to­r". Wh­y? Le­t's see.

For star­ter­s, it's no lon­ger true that I wro­te it. Al­thou­gh I am sti­ll pus­hing mo­re co­de that an­yo­ne, the­re are 54 other con­tri­bu­tor­s. That num­ber is as­to­nis­hin­g. Wh­y? Be­cau­se I es­ti­ma­te the­re are around 200 Niko­la user­s. That means the ra­tio of con­tri­bu­tors to users is in­cre­di­bly hi­gh.

That is pro­ba­bly ex­plai­ned be­cau­se the way you build a si­te using Niko­la is ve­ry pro­gra­m­mer orien­te­d. You could des­cri­be a sta­tic si­te ge­ne­ra­tor as a sort of "si­te com­pi­le­r" and not be far off the ma­rk. Many of the be­ne­fi­ts, like you can host your pa­ge sour­ces in gi­thu­b! are com­ple­te­ly mis­te­rious to no­n-­pro­gra­m­mer­s. So, I ex­pec­ted that num­ber to be hi­gh, bu­t, ha­ving a 25% use­r=>­de­ve­lo­per con­ver­sion ra­te? Tha­t's bi­za­rre.

So, I sus­pect I did so­me things we­ll wi­th this pro­ject [1], and wanted to thi­nk them out lou­d, and try to fur­ther the­m.

One thing I thi­nk I did we­ll was that it's an in­clu­si­ve pro­jec­t. If you pro­po­se so­me­thing you are ge­tting heard and I am gi­ving the pro­po­sal a fair shake. I may re­ject it, but not out of han­d, but ins­tead after so­me thou­gh­t. And if I am un­su­re, it's ac­cep­te­d. I would ra­ther get so­me­thing I am not fond of than dri­ve out a con­tri­bu­tor [2] be­cau­se I may chan­ge my min­d, but a con­tri­bu­tor tha­t's go­ne is not co­ming ba­ck.

Sa­me thing about granting co­m­mit ri­gh­ts: want the­m? You get them wi­th the first suc­ce­ss­ful PR by just askin­g.

To­day the­re was ano­ther step on this di­rec­tio­n: I am not the so­le ad­min an­y­mo­re. No lon­ger is http­s://­gi­thu­b.­co­m/­ral­si­na/­niko­la the ca­no­ni­cal re­po, it's now http­s://­gi­thu­b.­co­m/­ge­tniko­la/­niko­la. The web­si­te? Not http://­niko­la.­ral­si­na.­me but http://­ge­tniko­la.­com, paid for 5 year­s. Added two ad­mins to eve­r­y­thing (the awe­so­me da­mia­na­vi­la and Kw­pol­ska). Ga­ve up so­le con­trol of a loooong list of things [3] and now I can get run over by a bus and things should not bi­tro­t.

It pro­tec­ts tho­se 54 other con­tri­bu­tors and few hun­dred users from my ever lo­sing heart or in­te­res­t, whi­ch is a real risk, and should be alle­viate­d.

I thi­nk the most im­por­tant bit about con­ver­ting users in­to con­tri­bu­tors thou­gh, is that you just need to be friend­l­y. And Niko­la is lar­ge­ly a friend­ly pro­jec­t. And tha­t's ma­de it a lot of fun for the past year or so.

I on­ce read that if you re­fu­s­ed to use co­de wri­tten by ass­ho­les you could not boot any OS. We­ll, that may be true, but that does­n't mean being an ass­ho­le is OK. This is a sma­ll pro­ject that does a sma­ll thin­g. But at least I feel con­fi­dent it's not wri­tten by ass­ho­le­s. And tha­t's a vic­to­ry in itsel­f.

OTOH the­re are so­me ma­jor de­ffi­cien­cies sti­ll. Di­ver­si­ty is good in so­me areas (geo­gra­phi­ca­ll­y, for ins­tan­ce) but AFAIK the per­cen­ta­ge of wo­men con­tri­bu­ting to the co­de­ba­se is 0% and I ha­ve no idea wh­y, and I would lo­ve to im­pro­ve tha­t.

So, lo­ts of wo­rk do­ne, lo­ts mo­re to do. Tha­t's a good po­si­tion to be in, I thi­nk.


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!

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.


Contents © 2000-2023 Roberto Alsina