FlareStart
HomeNewsHow ToSources
FlareStart

Where developers start their day. All the tech news & tutorials that matter, in one place.

Quick Links

  • Home
  • News
  • Tutorials
  • Sources
  • Privacy Policy

Connect

© 2026 FlareStart. All rights reserved.

Back to articles
Shiki Has a Free Syntax Highlighter — Here's How to Use It
How-ToWeb Development

Shiki Has a Free Syntax Highlighter — Here's How to Use It

via Dev.to WebdevAlex Spinov2h ago

Prism.js highlights code on the client at runtime. highlight.js ships a huge bundle. Shiki uses VS Code's exact grammar engine — pixel-perfect highlighting at build time. What Is Shiki? Shiki is a syntax highlighter powered by TextMate grammars — the same engine VS Code uses. It produces perfectly highlighted HTML at build time, so zero JavaScript runs in the browser. Quick Start npm install shiki import { codeToHtml } from ' shiki ' ; const html = await codeToHtml ( ' const x = 42; ' , { lang : ' typescript ' , theme : ' github-dark ' , }); // Returns: <pre class="shiki github-dark">...</pre> // No client-side JS needed — just render the HTML 100+ Languages, 30+ Themes All VS Code languages and themes work out of the box: // Popular languages const tsCode = await codeToHtml ( code , { lang : ' typescript ' , theme : ' one-dark-pro ' }); const pyCode = await codeToHtml ( code , { lang : ' python ' , theme : ' dracula ' }); const rsCode = await codeToHtml ( code , { lang : ' rust ' , th

Continue reading on Dev.to Webdev

Opens in a new tab

Read Full Article
0 views

Related Articles

How-To

10 Things Every Software Developer Should Know (But Most Ignore)

Medium Programming • 45m ago

The Deceptively Tricky Art of Designing a Steering Wheel
How-To

The Deceptively Tricky Art of Designing a Steering Wheel

Wired • 1h ago

7 Wireshark Filters That Instantly Make You Look Like a Network Expert
How-To

7 Wireshark Filters That Instantly Make You Look Like a Network Expert

Medium Programming • 2h ago

Week 6 — No New Problems. Just Me and Everything I Already Learned.
How-To

Week 6 — No New Problems. Just Me and Everything I Already Learned.

Medium Programming • 7h ago

What OpenClaw Gets Wrong Out of the Box (And How to Fix It)
How-To

What OpenClaw Gets Wrong Out of the Box (And How to Fix It)

Medium Programming • 8h ago

Discover More Articles