Skip to content

Highlight home snippets using shiki#1834

Merged
josevalim merged 1 commit into
elixir-lang:jv-new-websitefrom
jonatanklosko:jk-shiki
Jul 15, 2026
Merged

Highlight home snippets using shiki#1834
josevalim merged 1 commit into
elixir-lang:jv-new-websitefrom
jonatanklosko:jk-shiki

Conversation

@jonatanklosko

Copy link
Copy Markdown
Member

Replaces the simple elixir tokenizer with shiki (already used by blog posts). Currently it uses github-dark theme (the blog posts use github-light), I think it fits quite nicely and definitely makes the examples more readable.

The use cases snippets and the editor examples are all highlighted at build time. For the highlighting on changes, we load a separate highlighter JS chunk, only once the user focuses the editor. The editor is mostly for small snippets, so highlighting latency should not be an issue. I also pasted a 500 LOC file and even there editing works smoothly.

@josevalim
josevalim merged commit 214ce16 into elixir-lang:jv-new-website Jul 15, 2026
@josevalim

Copy link
Copy Markdown
Member

💚 💙 💜 💛 ❤️

@jonatanklosko
jonatanklosko deleted the jk-shiki branch July 15, 2026 11:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants