Skip to content

🌈 Shiki plugin for milkdown. Add support for shiki highlight.

License

Notifications You must be signed in to change notification settings

songhn233/milkdown-plugin-shiki

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

milkdown-plugin-shiki

Shiki plugin for milkdown. Add support for shiki highlight.

Example Usage

import { Editor } from '@milkdown/core';
import { commonmark } from '@milkdown/preset-commonmark';
import { nord } from '@milkdown/theme-nord';

import { shiki } from 'milkdown-plugin-shiki';

Editor.make()
  .use(nord)
  .use(commonmark)
  .use(await shiki())
  .create();

Options

Editor.use(await shiki({
  theme: 'min-dark',
  cdn: 'https://unpkg.com/shiki/',
  otherLangs: ['tsx', 'jsx']
}))

More infomaion about themes and langs config can be found in shiki docs.