How to disable plugins

Hi, I 'm just trying out Grav for a personal blog site. So far I have got the git commit publishing working and I really like the lightweight feel of Grav.

However, I’m wondering how do I disable plugins on the blog page?
For example, I would like to disable the random plugin in the sidebar.
I found the partial and it checks to see if the plugin is enabled, so I tried adding various lines to my YAML front matter in my but none of them seems to disable the plugin.

I have tried the following in

enabled: false

and also:

enabled: false

Do I have to physically delete the random plugin folder or is there a way to disable it in config?



Hi Charles, I can confirm that your settings in doesn’t work. However you can disable the random module (completely) by setting

enabled: false

in the user/plugins/random/random.yaml file.

Thanks for that, I will give it a try.

So is there really no way to disable a plugin for an individual page?

Also, I’m a little unsure which files I should or should not be changing? For example I searched on here about adding Google Analytics, and the answer seems to be modifying a partial within the theme. Isn’t this going to get lost when the theme gets updated?

Similar to modifying the random plugin, won’t those changes be lost if it ever gets updated?

Just trying to establish some best working practices to make my life easier in the future.

Certain plugins can be disabled for a certain page. This logic needs to be provided by the plugin itself. Smartypants for example has this capability:

It requires the plugin to merge the page header with its regular configuration:

This is the preferred approach.

If you are looking to make modifications to the theme while still allowing upgradeability of said theme, you should read my blog post on theme inheritance

Ok thanks for the clarification.

Might be nice to see some more consistency in the behaviour of plugins in this respect, but the theme inheritance sounds great, I will switch over to this method.

Thanks for the help.