I’m trying to write a plugin that posts to twitter when a new blog post is created. This is my thinking:
Listen for a save event
Check if data exists in the storage
Check taxonomy
Evaluate and act
The problem that I’m facing is that I’m not sure which event to use. I’m new to Grav, so I’m probably just missing something… I’ve looked at the Grav lifecylce to ascertain what event to use, but it seems to me that most of the events are aimed at “front-end” events (or events concerned with the delivery of the content, not so much the creation)
Could someone perhaps point me in the right direction?
Thanks Sommerregen. I was actually just starting to look at the Admin plugin, but this saves me some time.
For my use case, I’m happy with my plugin only being triggered by admin, but I guess if I was to make the plugin available to the community, I should consider the filesystem too?
Yes, as long as you only care about the Admin that’s totally enough. Considering the filesystem besides the admin use case is much appreciated, but should not be mandatory to publish your plugin. Even if your plugin only supports Admin for the moment, it will definitely an enrichment for the Grav community!