Originally created by @jcubit on GitHub (Oct 8, 2025).
Feature Name
Add Pkl language grammar into Highlight.js
Description
Hi 👋
Would it be possible to add a Pkl language grammar into highlight.js?
Thank you for considering this!
Motivation
highlight.js is a popular syntax-highlighting javascript package. The community of Pkl users can benefit from this support. In particular, Docc renders language syntax via highlight.js. Any website could use this javascript package to show Pkl code.
Originally created by @jcubit on GitHub (Oct 8, 2025).
## Feature Name
Add Pkl language grammar into Highlight.js
## Description
Hi 👋
Would it be possible to add a Pkl language grammar into [highlight.js](https://highlightjs.readthedocs.io/en/latest/language-contribution.html)?
Thank you for considering this!
## Motivation
`highlight.js` is a popular syntax-highlighting javascript package. The community of Pkl users can benefit from this support. In particular, [Docc renders](https://github.com/swiftlang/swift-docc-render/issues/950#issuecomment-2981286300) language syntax via `highlight.js`. Any website could use this javascript package to show Pkl code.
@bioball commented on GitHub (Dec 16, 2025):
This is now released! https://github.com/apple/highlightjs-pkl
I'm also working on a PR for https://github.com/swiftlang/swift-docc-render, should come shortly.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @jcubit on GitHub (Oct 8, 2025).
Feature Name
Add Pkl language grammar into Highlight.js
Description
Hi 👋
Would it be possible to add a Pkl language grammar into highlight.js?
Thank you for considering this!
Motivation
highlight.jsis a popular syntax-highlighting javascript package. The community of Pkl users can benefit from this support. In particular, Docc renders language syntax viahighlight.js. Any website could use this javascript package to show Pkl code.@bioball commented on GitHub (Nov 11, 2025):
I agree that this is good to have. We'll look into it.
@bioball commented on GitHub (Dec 16, 2025):
This is now released! https://github.com/apple/highlightjs-pkl
I'm also working on a PR for https://github.com/swiftlang/swift-docc-render, should come shortly.
@jcubit commented on GitHub (Dec 16, 2025):
Awesome work! 🚀 Thank you