Elderjs / plugin-template

Elder.js plugin template

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

plugin.config in allRequests hook doesn't reflect config elder.config.js

noxasch opened this issue · comments

Hello,

In my plugin, i have to use allRequests hook because i need to modify allRequest before it generate permalink.

At the moment in allRequest hooks, i have to check the config from settings.plugins['elderjs-plugin-my-plugin'], otherwise it will use default plugin config set in plugin hook. However in bootstrap hook, the config does show the expected config from elderjs.config.js. Is this the expected behavior or is it a bug ?

the plugin repo is here https://github.com/noxasch/elderjs-plugin-blog-pagination

my bad, it seems that in plugin, all the hook accept plugin object as params. without accepting plugin as params, it will use the default config object.

Yep you nailed it. All of the hooks get the plugin param. :)