--- import { Marked } from 'marked'; import markedShiki from 'marked-shiki'; import { getHighlighter } from 'shiki'; interface Props { content: string; class?: string; } const { content, class: className } = Astro.props; // `getHighlighter` is async, it initializes the internal and // loads the languages and themes specified. // Then later you can use `highlighter.codeToHtml` synchronously // with the loaded themes and languages. const highlighter = await getHighlighter({ langs: ['jsx', 'js'], themes: ['min-dark'] }); const html = await new Marked() .use( markedShiki({ highlight(code, lang, props) { return highlighter.codeToHtml(code, { lang, theme: 'min-dark' }); } }) ) .parse(content); ---