[highlightjs] Use new 'head'/'footer' hooks

- Create separate addon javascript file
- Register stylesheet and Javascript files
This commit is contained in:
Hypolite Petovan 2018-09-20 21:32:47 -04:00
parent 0afab99d84
commit 27a48ae84a
2 changed files with 18 additions and 24 deletions

View file

@ -0,0 +1,6 @@
hljs.initHighlightingOnLoad();
document.addEventListener('postprocess_liveupdate', function () {
var blocks = document.querySelectorAll('pre code:not(.hljs)');
Array.prototype.forEach.call(blocks, hljs.highlightBlock);
});