Skip to content

zhangyu1818/rehype-default-code-lang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rehype-default-code-lang

Add a default programming language to your code tags.

Tip

This plugin is ideal for migrating to Shiki, as @shikijs/rehype does not style code blocks without an explicit language. This plugin addresses that issue.

Features

  • Automatically adds a default language class to <code> tags that lack a language specification.
  • Facilitates the integration of syntax highlighting libraries like Shiki, especially when existing content lacks language annotations.

Installation

pnpm install rehype-default-code-lang

Usage

import { rehypeDefaultCodeLang } from 'rehype-default-code-lang'

About

Add a default programming language to your code tags.

Topics

Resources

Stars

Watchers

Forks