Posts about nikola (old posts, page 8)

2013-09-11 18:41

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

I have posted over 50 posts here about Nikola and most of them contain something like "Nikola, my static blog/site generator". Well, that's not the case anymore. From now on I will say "a static blog/site generator". Why? Let's see.

For starters, it's no longer true that I wrote it. Although I am still pushing more code that anyone, there are 54 other contributors. That number is astonishing. Why? Because I estimate there are around 200 Nikola users. That means the ratio of contributors to users is incredibly high.

That is probably explained because the way you build a site using Nikola is very programmer oriented. You could describe a static site generator as a sort of "site compiler" and not be far off the mark. Many of the benefits, like you can host your page sources in github! are completely misterious to non-programmers. So, I expected that number to be high, but, having a 25% user=>developer conversion rate? That's bizarre.

So, I suspect I did some things well with this project [1], and wanted to think them out loud, and try to further them.

One thing I think I did well was that it's an inclusive project. If you propose something you are getting heard and I am giving the proposal a fair shake. I may reject it, but not out of hand, but instead after some thought. And if I am unsure, it's accepted. I would rather get something I am not fond of than drive out a contributor [2] because I may change my mind, but a contributor that's gone is not coming back.

Same thing about granting commit rights: want them? You get them with the first successful PR by just asking.

Today there was another step on this direction: I am not the sole admin anymore. No longer is https://github.com/ralsina/nikola the canonical repo, it's now https://github.com/getnikola/nikola. The website? Not http://nikola.ralsina.me but http://getnikola.com, paid for 5 years. Added two admins to everything (the awesome damianavila and Kwpolska). Gave up sole control of a loooong list of things [3] and now I can get run over by a bus and things should not bitrot.

It protects those 54 other contributors and few hundred users from my ever losing heart or interest, which is a real risk, and should be alleviated.

I think the most important bit about converting users into contributors though, is that you just need to be friendly. And Nikola is largely a friendly project. And that's made it a lot of fun for the past year or so.

I once read that if you refused to use code written by assholes you could not boot any OS. Well, that may be true, but that doesn't mean being an asshole is OK. This is a small project that does a small thing. But at least I feel confident it's not written by assholes. And that's a victory in itself.

OTOH there are some major defficiencies still. Diversity is good in some areas (geographically, for instance) but AFAIK the percentage of women contributing to the codebase is 0% and I have no idea why, and I would love to improve that.

So, lots of work done, lots more to do. That's a good position to be in, I think.


[1] Alternative explanation: I did some things so badly I have driven out 99% of the user base.
[2] Within reason.
[3] Github's checklists on Issues are great
[4] Within reason.
[5] Optional.
[6] Not really.

2013-09-07 18:35

Nikola 6.0.0 released

Finally! This took a while because there was a lot of work done, but release 6.0.0 of Nikola my static site and blog generator is out.

Details, files, etc at github

I have tried, for this release, to do things better, be more careful and document as much as possible, as well as tried to hit most things that were hard to fix in a single backwards incompatible break.

Some of the new features are described in a series of blog posts: 1 2 3 4 5

Also: brand new modern themes site: http://themes.getnikola.com and new domain http://getnikola.com among many other tweaks.

Have fun!

2013-08-31 14:46

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?

  1. In your theme, put LESS files in the less/ folder.
  2. Create less/targets and put there the files that should be compiled using 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 personally am not writing that hypothetical LESS-based theme, but I am more than ready to help whoever wants to do one.

2013-08-30 18:59

New in Nikola v6 part IV: Awesome Auto Mode

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: Auto Mode

Nikola has had, since day one, a way to run in "auto mode". That means that it would rebuild the site automatically when it saw a file change. That was provided by doit the cool software that handles nikola's task tree.

The problem was that it was slightly limited, and it didn't notice configuration changes, or when you added new files. It only reacted to changes in things it already knew as dependencies.

Well, in v6, Nikola has a new auto mode courtesy of Python Livereload that fixes all that.

I think the best way to show it is with a video, so here it is (there are typos and such, just see the big picture ;-):

2013-08-29 11:48

New in Nikola v6 III: comment alternatives

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: Comments

Nikola has supported 3rd party comment services since day one. Because it started as "something that generates my site", it supported the comment system I was using (and still am using), Disqus.

There is nothing wrong with Disqus, and it will be the default in v6, but if you want something else... we got you covered.

So Nikola v6 supports:

All with just minor changes in your config. Because of how it's done, all themes will support all comment systems with at most very minor tweaks.

If you know of any other comment systems worth supporting, just open an issue and I'll get them in.

UPDATE
Thanks to Kwpolska and punchagan now Google+ and Facebook are also supported for comments.

2013-08-28 20:09

New in Nikola v6 part II: We Love Javascript

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: Javascript

So, Nikola builds static pages. Like I often say, that doesn't mean they have to be boring. IN this release, Nikola's templates are organized in such a way that it's easy to create complex javascript-based layouts. Let's see an example.

Read more…

2013-08-27 19:09

New in Nikola v6 part I: Typography

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: Typography.

Nikola used to suck at this. It produced sites like most websites: absolute garbage when it came to typography. So, we fixed it.

Here is what a certain section of A Study in Scarlet looked like when built using Nikola 5.5.1 (the current release):

Read more…

2013-08-23 17:10

The best reStructuredText directive ever. Really.

It all started quietly with an Issue in the Nikola bug tracker:

gustavodiazjaimes opened this issue 3 hours ago
oembed by micawber - feature sugestion

instead of using specific code for embed object (Youtube, Vimeo, Soundcloud) use a generic solution like https://github.com/coleifer/micawber

So, I looked at micawber. And it's awesome and I had never heard of it before. What it does is, it looks at a URL, and if it knows the site where it's pointed at, it will then gather information from it. And using that information it will create for you a HTML fragment so you can embed it in your own HTML page.

And how hard is it to turn that into a reStructuredText directive? NOT HARD AT ALL.

import micawber

class Media(Directive):
    """ Restructured text extension for inserting any sort of media using micawber."""
    has_content = False
    required_arguments = 1

    def run(self):
        providers = micawber.bootstrap_basic()
        return [nodes.raw('', micawber.parse_text(self.arguments[0], providers), format='html')]

So now, in Nikola's github master you can do this:

Read more…

Contents © 2000-2019 Roberto Alsina