11 Sep 2012 ralsina   » (Master)

Nikola is Pluginificated.

Yes, I know that's not a real word.

So, the git master of Nikola now has plugins. In fact, not only does it have plugins, but is basically made of plugins.

You see, the code used to mostly be inside a class (called Nikola), and ... it had grown. That class had grown up to around 2000 lines of code. Which is completely ridiculous.

So, using Yapsy I turned the code inside out: almost all the code that was in that monster class was moved into plugins and the class turned into a smart plugin loader.

This has brought several advantages:

  • Now you can extend Nikola for your own purposes. Just create a plugin folder in your site, and put the extra functionality there.
  • Support for whole categories of things is now modular. Want to support a different markup? A different template system? Just write a plugin.
  • Want to add completely new functions to Nikola? Like, say, a way to import data from another blog tool, or something like planet software? Well, just add a "command plugin".

What has changed for the user?

  • You can delete dodo.py from your site.
  • Use nikola build instead of doit
  • Use nikola serve instead of doit serve

Some minor things still need doing in this area (notable, fixing the docs), but the main refactoring is there.

Syndicated 2012-09-11 18:50:56 from Lateral Opinion

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!