summaryrefslogtreecommitdiff
path: root/src/components/Markdown.astro
diff options
context:
space:
mode:
authorTomasBankauskas <tbdizainas@gmail.com>2025-03-20 15:16:16 +0200
committerTomasBankauskas <tbdizainas@gmail.com>2025-03-20 15:16:16 +0200
commit8c543b6bb7ba29cfed559c3693b4149d1204ef78 (patch)
tree78283952c019d5c0ede508c57640a31467b65bd2 /src/components/Markdown.astro
parentf8b333c690e13a594ff97043856a16f6c3f6fd48 (diff)
removed daisyui
Diffstat (limited to 'src/components/Markdown.astro')
-rw-r--r--src/components/Markdown.astro11
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({