diff options
| author | TomasBankauskas <tbdizainas@gmail.com> | 2025-03-20 15:16:16 +0200 |
|---|---|---|
| committer | TomasBankauskas <tbdizainas@gmail.com> | 2025-03-20 15:16:16 +0200 |
| commit | 8c543b6bb7ba29cfed559c3693b4149d1204ef78 (patch) | |
| tree | 78283952c019d5c0ede508c57640a31467b65bd2 /src/components/Markdown.astro | |
| parent | f8b333c690e13a594ff97043856a16f6c3f6fd48 (diff) | |
removed daisyui
Diffstat (limited to 'src/components/Markdown.astro')
| -rw-r--r-- | src/components/Markdown.astro | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/components/Markdown.astro b/src/components/Markdown.astro index e8996c5..ce83e60 100644 --- a/src/components/Markdown.astro +++ b/src/components/Markdown.astro @@ -1,7 +1,7 @@ --- import { Marked } from 'marked'; import markedShiki from 'marked-shiki'; -import { getHighlighter } from 'shiki'; +import { highlighterPromise } from '../utils/highlighter'; interface Props { content: string; @@ -10,14 +10,7 @@ interface Props { 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 highlighter = await highlighterPromise; const html = await new Marked() .use( markedShiki({ |
