Open IslamZaoui opened 1 week ago
Is your feature request related to a problem? Please describe. using shiki in fence component result in bad preformace in loading the page
Describe the solution you'd like better to use a highlighting function to avoid sending shiki to client like this example
//svelte.config.js function customHighlighter (content: string, language:string ){ return shiki.codeToHtml(content, { lang: language, theme: 'github-dark', transformers: [ transformerNotationDiff(), transformerNotationErrorLevel(), transformerNotationHighlight() ] }) } const config = { preprocess: [ vitePreprocess(), markdoc({ highlighter: customHighlighter }) ] }
Describe alternatives you've considered n/a
Additional context n/a
It might be smart to add this, so far I have been relying on pre-rendering for this using SvelteKit 🤔
Is your feature request related to a problem? Please describe. using shiki in fence component result in bad preformace in loading the page
Describe the solution you'd like better to use a highlighting function to avoid sending shiki to client like this example
Describe alternatives you've considered n/a
Additional context n/a