Closed kevincrafts closed 1 year ago
I see that Kevin linked to the cu_js_includes module in one of our github repos. However, use the Express code found in our upstream repo here: https://github.com/CuBoulder/pantheon-upstream-express-production/tree/master/web/profiles/express/modules/custom/cu_js_include
Here are some things from the D7 codebase that might be of some help for learning how this feature works at the moment:
While we have prevented site editors from adding their own javascript to sites, there are a few services that we have allowed through various tools we made over the years. The most current way to do this is with the cu_js_includes module (https://github.com/CuBoulder/express_mono/tree/dev/modules/custom/cu_js_includes) which allows editors to create specific types of includes, and then add them to the pages they need via the context module (in cases were the javascript just needs to be added to the html), or a block (for when the javascript needs to be added to a particular region on the page).
The types of javascript includes we currently allow through this are:
AdmitHub, LiveChat, Slate forms, and StatusPage.
Sites may need more than one of each type of these per site and need the ability to place them on one, multiple, or all pages.