Skip to content

JIT plugin for Highlight.js to load language files automatically via CDN, efficiently.

License

Notifications You must be signed in to change notification settings

taufik-nurrohman/highlight.jit.js

Repository files navigation

JIT Plugin for Highlight.js

Demo

Usage

<!-- Load the JavaScript library along with your pre-defined language highlighter -->
<script src="highlight.min.js"></script>
<!-- Let other language highlighter(s) to be loaded by my plugin automatically -->
<script src="highlight.jit.min.js"></script>
<script>
hljs.currentLanguagePath = 'https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.0.3/languages/%s.min.js';
hljs.initHighlighting();
</script>

License

BSD