How are plugins loaded automatically?

I’d like to understand better how discourse automatically loads plugins, e.g all those placed in the /plugins directory.

How does a plugin can provide a mount point and its resources during initialization?

Can someone either explain this or point me to where I can find more information?

Your best starting point is the plugin/instance.rb file

1 Like

Yes that’s very useful for the plugin side, but I’m also interested in how the discourse side manages it.

Don’t be misguided by the CustomEmoji class at the top, further in the file is where the Discourse side manages it.