mirror of
https://github.com/pesde-pkg/pesde.git
synced 2025-05-04 02:23:51 +01:00
fix(website): move highlighter creation into load
This commit is contained in:
parent
6c20193bd6
commit
ab07a2cd95
1 changed files with 5 additions and 5 deletions
|
@ -11,11 +11,6 @@ import { createCssVariablesTheme, createHighlighter } from "shiki"
|
|||
import { unified } from "unified"
|
||||
import type { PageLoad } from "./$types"
|
||||
|
||||
const highlighter = await createHighlighter({
|
||||
themes: [],
|
||||
langs: [],
|
||||
})
|
||||
|
||||
const fetchReadme = async (
|
||||
fetcher: typeof fetch,
|
||||
name: string,
|
||||
|
@ -48,6 +43,11 @@ export const load: PageLoad = async ({ parent, fetch }) => {
|
|||
|
||||
const readmeText = await fetchReadme(fetch, name, version, targets[0].kind)
|
||||
|
||||
const highlighter = await createHighlighter({
|
||||
themes: [],
|
||||
langs: [],
|
||||
})
|
||||
|
||||
const file = await unified()
|
||||
.use(remarkParse)
|
||||
.use(remarkGfm)
|
||||
|
|
Loading…
Add table
Reference in a new issue