Shiki Code

Integrates Shiki syntax highlighting for code blocks in Payload CMS.

Community 2 115/wk MIT v0.0.3

Installation

pnpm add payload-shiki-code

About

The Shiki Code plugin enhances Payload CMS by providing server-rendered syntax highlighting for code blocks using Shiki. This integration is particularly useful for rich text fields, offering support for over 60 programming languages and themes. It allows for extensive customization, including options for lazy loading, line highlighting, and display preferences such as line numbers and language labels. Installation requires adding the plugin to your Payload configuration, after which it can be easily integrated into collections or global fields. The plugin also includes lifecycle hooks for further extensibility and performance optimization through a cached highlighter instance. Developers can take advantage of TypeScript support throughout the configuration and usage, ensuring type safety and smooth development workflows. The plugin offers built-in support for defining which languages to include, reducing bundle size and improving render speed.

Package info

Package name
payload-shiki-code
Latest version
0.0.3
Unpacked size
170 kB
License
MIT
Weekly downloads
115
Last publish
Sep 17, 2025

More from escwxyz

View profile

Similar plugins

More in Content