Is there any way to add your own .js file to use? I want to add Prism.js and host the .js file locally. However the amount of JavaScript is to much to fit in the code injection section. Where should I add my custom .js to be able to load it on my Ghost blog?
Why do you need to add this locally? Is there any special reason?
You should just use the CDN as everyone does and just put the necessary script in the code injection. If you need a tutorial, here’s a couple:
I want to control the whole delivery and also avoid CDNs that is reported by Decentraleyes and Privacy Badger. I know that you can use CDNs, that’s how I’m currently embedding the scripts.
Also I used Prism’s custom configurator which outputs a custom .js-file, that exact configuration isn’t on any CDN.
The best method to locally host assets like this are through your theme. Code injection is generally used for minor modifications, and adding a large script like prism is kind-of out of its scope