New in Nikola v6 part V: LESS is more
I am planning to do a major release (version 6!) of Nikola my static blog and site generator the next weekend. It's a major version because there has been a ton of feature work done. So, I will do a quick series highlighting some of those improvements this week.
Today's Topic: LESS
Unless you are happy with your site looking like straight bootstrap (and you really should not) CSS goes a long way towards making 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 really, really crappy "language". That's why a whole philum of tools has been created that take a more powerful syntax and output CSS.
Nikola now has support for one of these, called LESS (although adding support for others like SASS should be very easy).
So, how does it work?
In your theme, put LESS files in the
less/
folder.Create
less/targets
and put there the files that should be compiled usinglessc
, one per line.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 personally am not writing that hypothetical LESS-based theme, but I am more than ready to help whoever wants to do one.