fix(website): use v1 api for docs

This commit is contained in:
daimond113 2025-02-23 12:43:54 +01:00
parent cb3c47477a
commit 308320602f
No known key found for this signature in database
GPG key ID: 640DC95EC1190354

View file

@ -18,7 +18,7 @@ const findDocTitle = (docs: DocEntry[], name: string): string | undefined => {
export const load: PageLoad = async ({ params, parent, fetch }) => {
try {
const page = await fetchRegistry(
`packages/${encodeURIComponent(`${params.scope}/${params.name}`)}/${encodeURIComponent(params.version ?? "latest")}/${encodeURIComponent(params.target ?? "any")}?doc=${encodeURIComponent(params.doc)}`,
`packages/${encodeURIComponent(`${params.scope}/${params.name}`)}/${encodeURIComponent(params.version ?? "latest")}/${encodeURIComponent(params.target ?? "any")}/doc?doc=${encodeURIComponent(params.doc)}`,
fetch,
).then((r) => r.text())