How are plugins loaded automatically?

(Kgish) #1

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?

(Régis Hanol) #2

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

(Kgish) #3

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

(Richard - #4

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