fix(website): use fallback language

This commit is contained in:
LukaDev 2024-09-29 14:39:18 +02:00
parent 29973e0b79
commit 8876cbab87

View file

@ -1,15 +1,15 @@
import { fetchRegistry, RegistryHttpError } from "$lib/registry-api" import { fetchRegistry, RegistryHttpError } from "$lib/registry-api"
import { unified } from "unified" import rehypeShiki from "@shikijs/rehype"
import type { PageServerLoad } from "./$types" import rehypeRaw from "rehype-raw"
import remarkParse from "remark-parse"
import remarkRehype from "remark-rehype"
import remarkGfm from "remark-gfm"
import remarkGemoji from "remark-gemoji"
import rehypeSanitize from "rehype-sanitize" import rehypeSanitize from "rehype-sanitize"
import rehypeStringify from "rehype-stringify" import rehypeStringify from "rehype-stringify"
import rehypeRaw from "rehype-raw" import remarkGemoji from "remark-gemoji"
import rehypeShiki from "@shikijs/rehype" import remarkGfm from "remark-gfm"
import remarkParse from "remark-parse"
import remarkRehype from "remark-rehype"
import { createCssVariablesTheme } from "shiki" import { createCssVariablesTheme } from "shiki"
import { unified } from "unified"
import type { PageServerLoad } from "./$types"
const fetchReadme = async ( const fetchReadme = async (
fetcher: typeof fetch, fetcher: typeof fetch,
@ -57,7 +57,7 @@ export const load: PageServerLoad = async ({ parent }) => {
variableDefaults: {}, variableDefaults: {},
fontStyle: true, fontStyle: true,
}), }),
defaultLanguage: "text", fallbackLanguage: "text",
}) })
.use(rehypeStringify) .use(rehypeStringify)
.process(readmeText) .process(readmeText)