I try to load prism.js in my ghost.
I've forked this repo which is not supporting the new ghost 1.x verions. I've updated the tags so I'm able to load the layouts but I'm still unable to load prism.js
.
In default.hbs
:
{{> loaders/load-prism}}
In partials/loaders/load-prism.js
(here I want to load prism.js and prism.css)
<script>
(function() {
var l = document.createElement('script'); l.type = 'text/javascript'; l.async = true;
l.src = '{{asset "lib/prism/prism.js"}}';
var h = document.getElementsByTagName('head')[0]; h.appendChild(l, h);
}());
var highlightAll = function() {
Prism.highlightAll();
};
window.addEventListener('load', highlightAll);
</script>
And of course I've download my prism.js and prism.css. It's in assets
/lib/prism/prism.js and prism.css