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.pyfrom your site.
nikola buildinstead of
nikola serveinstead of
Some minor things still need doing in this area (notable, fixing the docs), but the main refactoring is there.
Nikola does sound good...
The only thing I don't really like about it is doing comments with Disqus: what if the company ever goes belly-up (it happens), or suddenly decides that it wants more money to keep your comments than you are willing to pay for the service?
Comments are am important part of a blog's content, the prospect of losing them without recourse is kinda troubling, isn't it?
There is nothing intrinsically bound to disqus, it's just what I use so it got into the templates by default.
If you want to support alternative services (including self-hosted and/or community services) it's easy to add. Having said that, disuqs has a very clean exit strategy for your data, so if they go evil and/or dead, it's just the effort moving out, compared to the effort of setting up something else now and maintaining it forever.
Why not just refactor it into classes and/or functions etc. in additional modules? And why Yapsy instead of entry points? Just curious..
I used the tool I had in my toolbox: I used Yapsy because I know how to use it already, unlike entry points :-)
It is refactored into classes, the point of the plugin system is how to locate and load those classes. For example, this allows easy
extensibility, because the user only needs to drop extra or replacement plugins in a folder inside his project.