plugin order

5 views
Skip to first unread message

Dave

unread,
Dec 2, 2016, 12:46:08 PM12/2/16
to nikola-discuss
Hi,

Is there anyway to specify order of plugins, or to know which plugin will run before another when of the same plugin type


I am finding myself in the position that as I add more plugins some plugins are relying on things to have happen before with other plugins.


At the moment I am hacking in more Signal plugin events,

signal('initialized_early').send(self.nikola)
signal('initialized').send(self.nikola)
signal('initialized_late').send(self.nikola)


But I don't think this is a good long term strategy :)

Is there another way?


Cheers

Roberto Alsina

unread,
Dec 2, 2016, 12:48:30 PM12/2/16
to nikola-discuss
Plugins that are tasks can depend on other plugins tasks being finished.
For example in the tags plugin:

```
            'task_dep': ['render_posts'],

```
That means that task requires the rendr_posts task to be finished before running.

--
You received this message because you are subscribed to the Google Groups "nikola-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nikola-discus...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Dave

unread,
Dec 2, 2016, 2:39:46 PM12/2/16
to nikola-discuss, ral...@kde.org
ahh yes! of course. That will work nicely.

Of course I didn't bother using tasks, just hacked in what I needed. Although I do have a todo note "convert these to tasks" so I guess now is a good a time as any


Many thanks
Reply all
Reply to author
Forward
0 new messages