Skip to main content

Ralsina.Me — Roberto Alsina's website

Posts about nikola (old posts, page 16)

Lunchtime Nikola Feature: graphviz

Since we are in the process of adding a plug­in re­po for Niko­la, I want­ed to add a sim­ple plug­in there so that we can show how it work­s.

So here it is. You use this:

.. graphviz::

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

And you get (as­sum­ing graphviz is in­stalled, and this plug­in is in­stalled, etc.) this:

Read more…

Trivial Nikola Deployment Using Pancake.io and Backlift

So, you want to pub­lish a site and want to do it now? As in, re­al­ly right now? And for free? And you are a Niko­la us­er.

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 Drop­Pages.­com or KISSr or Site44.­com or just use a Drop­box pub­lic fold­er.

Each of these ser­vices has ad­van­tages and dis­ad­van­tages, from lame URLs to cost­ing mon­ey, but hey, for a quick thing they are cool. You can al­ways up­grade to the re­al thing lat­er.

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

I have post­ed over 50 posts here about Niko­la and most of them con­tain some­thing like "Niko­la, my stat­ic blog/site gen­er­a­tor". Well, that's not the case any­more. From now on I will say "a stat­ic blog/site gen­er­a­tor". Why? Let's see.

For starter­s, it's no longer true that I wrote it. Al­though I am still push­ing more code that any­one, there are 54 oth­er con­trib­u­tors. That num­ber is as­ton­ish­ing. Why? Be­cause I es­ti­mate there are around 200 Niko­la user­s. That means the ra­tio of con­trib­u­tors to users is in­cred­i­bly high.

That is prob­a­bly ex­plained be­cause the way you build a site us­ing Niko­la is very pro­gram­mer ori­ent­ed. You could de­scribe a stat­ic site gen­er­a­tor as a sort of "site com­pil­er" and not be far off the mark. Many of the ben­e­fit­s, like you can host your page sources in github! are com­plete­ly mis­te­ri­ous to non-pro­gram­mer­s. So, I ex­pect­ed that num­ber to be high, but, hav­ing a 25% user=>de­vel­op­er con­ver­sion rate? That's bizarre.

So, I sus­pect I did some things well with this project [1], and want­ed to think them out loud, and try to fur­ther them.

One thing I think I did well was that it's an in­clu­sive projec­t. If you pro­pose some­thing you are get­ting heard and I am giv­ing the pro­pos­al a fair shake. I may re­ject it, but not out of hand, but in­stead af­ter some thought. And if I am un­sure, it's ac­cept­ed. I would rather get some­thing I am not fond of than drive out a con­trib­u­tor [2] be­cause I may change my mind, but a con­trib­u­tor that's gone is not com­ing back.

Same thing about grant­ing com­mit right­s: want them? You get them with the first suc­cess­ful PR by just ask­ing.

To­day there was an­oth­er step on this di­rec­tion: I am not the sole ad­min any­more. No longer is http­s://github.­com/ralsi­na/niko­la the canon­i­cal re­po, it's now http­s://github.­com/get­niko­la/niko­la. The web­site? Not http://niko­la.ralsi­na.me but http://get­niko­la.­com, paid for 5 years. Added two ad­mins to ev­ery­thing (the awe­some dami­anav­i­la and Kw­pol­s­ka). Gave up sole con­trol of a loooong list of things [3] and now I can get run over by a bus and things should not bi­trot.

It pro­tects those 54 oth­er con­trib­u­tors and few hun­dred users from my ev­er los­ing heart or in­ter­est, which is a re­al risk, and should be al­le­vi­at­ed.

I think the most im­por­tant bit about con­vert­ing users in­to con­trib­u­tors though, is that you just need to be friend­ly. And Niko­la is large­ly a friend­ly projec­t. And that's made it a lot of fun for the past year or so.

I once read that if you re­fused to use code writ­ten by ass­holes you could not boot any OS. Well, that may be true, but that does­n't mean be­ing an ass­hole is OK. This is a small project that does a small thing. But at least I feel con­fi­dent it's not writ­ten by ass­holes. And that's a vic­to­ry in it­self.

OTOH there are some ma­jor def­fi­cien­cies stil­l. Di­ver­si­ty is good in some ar­eas (geo­graph­i­cal­ly, for in­stance) but AFAIK the per­cent­age of wom­en con­tribut­ing to the code­base is 0% and I have no idea why, and I would love to im­prove that.

So, lots of work done, lots more to do. That's a good po­si­tion to be in, I think.


Nikola 6.0.0 released

Fi­nal­ly! This took a while be­cause there was a lot of work done, but re­lease 6.0.0 of Niko­la my stat­ic site and blog gen­er­a­tor is out.

De­tail­s, files, etc at github

I have tried, for this re­lease, to do things bet­ter, be more care­ful and doc­u­ment as much as pos­si­ble, as well as tried to hit most things that were hard to fix in a sin­gle back­wards in­com­pat­i­ble break.

Some of the new fea­tures are de­scribed in a se­ries of blog post­s: 1 2 3 4 5

Al­so: brand new mod­ern themes site: http://themes.get­niko­la.­com and new do­main http://get­niko­la.­com among many oth­er tweak­s.

Have fun!

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.


Contents © 2000-2024 Roberto Alsina