This repository hosts a Highlight.js library for the Pkl programming language.
Simply include the Highlight.js library as an asset in your HTML:
<script type="text/javascript" src="/path/to/highlightjs.min.js" />
<script type="text/javascript" src="/path/to/highlightjs-pkl/dist/pkl.min.js" />
<script type="text/javascript">
hljs.highlightAll();
</script>To use from Node.js, or when bundled with Webpack (or another packer):
npm install @apple/highlightjs-pklAnd import as an ES6 module:
import hljs from "highlight.js";
import pkl from "@apple/highlightjs-pkl";
hljs.registerLanguage("pkl", pkl);There's a lot more ways to use highlight.js. For more information, see their README.
highlightjs-pkl is released under the Apache 2.0 License. See LICENSE file for details.
Highlight.js is released under the BSD 3-Clause License. See LICENSE file for details.