Skip to main content

Ralsina.Me — Roberto Alsina's website

New in Nikola v6 part V: LESS is more

I am plan­ning to do a ma­jor re­lease (ver­sion 6!) of Niko­la my stat­ic blog and site gen­er­a­tor the next week­end. It's a ma­jor ver­sion be­cause there has been a ton of fea­ture work done. So, I will do a quick se­ries high­light­ing some of those im­prove­ments this week.

Today's Topic: LESS

Un­less you are hap­py with your site look­ing like straight boot­strap (and you re­al­ly should not) CSS goes a long way to­wards mak­ing your pages look just the way you want them to.

The bad part is that, if you have done any CSS you will know CSS is a re­al­ly, re­al­ly crap­py "lan­guage". That's why a whole philum of tools has been cre­at­ed that take a more pow­er­ful syn­tax and out­put CSS.

Niko­la now has sup­port for one of the­se, called LESS (although adding sup­port for oth­ers like SASS should be very easy).

So, how does it work?

  1. In your the­me, put LESS files in the less/ fold­er.

  2. Cre­ate less/­tar­gets and put there the files that should be com­piled us­ing lessc, one per line.

  3. There 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­son­al­ly am not writ­ing that hy­po­thet­i­cal LESS-based the­me, but I am more than ready to help who­ev­er wants to do one.

New in Nikola v6 part IV: Awesome Auto Mode

I am plan­ning to do a ma­jor re­lease (ver­sion 6!) of Niko­la my stat­ic blog and site gen­er­a­tor the next week­end. It's a ma­jor ver­sion be­cause there has been a ton of fea­ture work done. So, I will do a quick se­ries high­light­ing some of those im­prove­ments this week.

Today's Topic: Auto Mode

Niko­la has had, since day one, a way to run in "au­to mod­e". That means that it would re­build the site au­to­mat­i­cal­ly when it saw a file change. That was pro­vid­ed by doit the cool soft­ware that han­dles niko­la's task tree.

The prob­lem was that it was slight­ly lim­it­ed, and it did­n't no­tice con­fig­u­ra­tion changes, or when you added new files. It on­ly re­act­ed to changes in things it al­ready knew as de­pen­den­cies.

Well, in v6, Niko­la has a new au­to mode cour­tesy of Python Livereload that fix­es all that.

I think the best way to show it is with a video, so here it is (there are ty­pos and such, just see the big pic­ture ;-):

New in Nikola v6 III: comment alternatives

I am plan­ning to do a ma­jor re­lease (ver­sion 6!) of Niko­la my stat­ic blog and site gen­er­a­tor the next week­end. It's a ma­jor ver­sion be­cause there has been a ton of fea­ture work done. So, I will do a quick se­ries high­light­ing some of those im­prove­ments this week.

Today's Topic: Comments

Niko­la has sup­port­ed 3rd par­ty com­ment ser­vices since day one. Be­cause it start­ed as "some­thing that gen­er­ates my site", it sup­port­ed the com­ment sys­tem I was us­ing (and still am us­ing), Dis­qus.

There is noth­ing wrong with Dis­qus, and it will be the de­fault in v6, but if you want some­thing else... we got you cov­ered.

So Niko­la v6 sup­port­s:

All with just mi­nor changes in your con­fig. Be­cause of how it's done, all themes will sup­port all com­ment sys­tems with at most very mi­nor tweak­s.

If you know of any oth­er com­ment sys­tems worth sup­port­ing, just open an is­sue and I'll get them in.

UPDATE

Thanks to Kw­pol­s­ka and pun­cha­gan now Google+ and Face­book are al­so sup­port­ed for com­ments.

New in Nikola v6 part II: We Love Javascript

I am plan­ning to do a ma­jor re­lease (ver­sion 6!) of Niko­la my stat­ic blog and site gen­er­a­tor the next week­end. It's a ma­jor ver­sion be­cause there has been a ton of fea­ture work done. So, I will do a quick se­ries high­light­ing some of those im­prove­ments this week.

Today's Topic: Javascript

So, Niko­la builds stat­ic pages. Like I of­ten say, that does­n't mean they have to be bor­ing. IN this re­lease, Niko­la's tem­plates are or­ga­nized in such a way that it's easy to cre­ate com­plex javascrip­t-based lay­out­s. Let's see an ex­am­ple.

Read more…


Contents © 2000-2023 Roberto Alsina