picocms / Pico

Pico is a stupidly simple, blazing fast, flat file CMS.
http://picocms.org/
MIT License
3.81k stars 615 forks source link

Enable plugin only for one page? #533

Closed ohnonot closed 4 years ago

ohnonot commented 4 years ago

Is this possible? Maybe like this:

AFAICS, it would require the usage of something like config.PluginName.enabled: true?

PhrozenByte commented 4 years ago

You'll have to write a plugin to accomplish this. If you want to go with the YAML header solution, you'd have to hook into the onMetaParsed event, check for your variable and possibly enable said plugin using $this->getPico()->getPlugin('name_of_plugin')->setEnabled(true);

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in two days if no further activity occurs. Thank you for your contributions! :+1: