nextra icon indicating copy to clipboard operation
nextra copied to clipboard

Consume syntax highlighter as a component

Open alii opened this issue 3 years ago • 0 comments

I would like to build a multi language syntax highlighter using nextra-theme-docs@alpha. What would be the best way to consume the highlighter in my own component?

I saw https://github.com/shuding/nextra/issues/262 mentioned that either Shiki or Code Hike were being used right now but wasn't able to figure out which one it was or how to use it 😄

Thanks :) :heart:

alii avatar Apr 30 '22 11:04 alii

Hi there! Do you still need help? If you need extend languages for code blocks, use the follow option https://github.com/shuding/nextra/blob/6c58a89b067d5bafc04178390dab605059292344/packages/nextra/src/types.ts#L78

dimaMachina avatar Aug 23 '22 10:08 dimaMachina