[newbie] adding script file via plugin to head



I’m completely new to Discourse, Rails and Ember, so please excuse my basic question :wink:

I want to add some additional blocks of information gathered from external sources to the discourse website. I have the logic done already as a jquery block, using an existing jquery plugin. I’ve found an adsense plugin and it is adding a banner div above the content very well and seems to have a logic responsible for reloading the content on “page change” in Discourse. Exactly what I need.

But I’m stuck on something absolutely basic. How do I add an existing jquery plugin (inside my plugin folder) as a script inside the head section? I can’t find any information on getting the path of a resource from plugin folder and the function to add this path into head section.

Are there any resources I could use in learning about discourse plugins?

(Sam Saffron) #2

Have a look at existing plugins that do that, there are a pile of plugins under the Discourse · GitHub