Setting up Shiki on Next.js
Published 📅: ....
Last modified 📝: ....
Share this post on BlueskySee discussion on Bluesky
I recently updated how I handle syntax highlighting within code blocks on my
personal site here. After my recent refactor a few months ago, I had adopted
highlight.js originally but then only recently realized that it still doesn't
support JSX/TSX syntax highlighting.
I did some googling around, almost went down the path of using Prism.js as well,
and then remembered that shiki exists and decided
to give it a try.
Originally, I thought it was going to be pretty easy, or at least it was easy to implement for local development within my React Server Component setup for my blog. It was only when I went to deploy it that it started to break.