Skip to content

Commit 4ff9368

Browse files
committed
fix: update Typst official URL handling in base template
1 parent e6b04b8 commit 4ff9368

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

website/src/components/templates/BaseTemplate.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { html } from "hono/html";
22
import type { FC, PropsWithChildren } from "hono/jsx";
3-
import { basePath, originUrl, typstOfficialUrl } from "../../metadata";
3+
import { basePath, originUrl, typstOfficialDocsUrl } from "../../metadata";
44
import type { Page } from "../../types/model";
55
import { joinPath } from "../../utils/path";
66
import { getTranslationStatus } from "../../utils/translationStatus";
@@ -46,7 +46,7 @@ export const BaseTemplate: FC<BaseTemplateProps> = ({
4646
const translationStatus = getTranslationStatus(route);
4747
const absoluteRouteUrl = new URL(route, originUrl).toString();
4848
const faviconUrl = new URL(`${basePath}/favicon.png`, originUrl).toString();
49-
const typstOfficialRouteUrl = new URL(route, typstOfficialUrl).toString();
49+
const typstOfficialRouteUrl = joinPath(typstOfficialDocsUrl, route.slice(basePath.length - (basePath.endsWith("/") ? 1 : 0)));
5050
return (
5151
<html lang="ja" class="scroll-pt-24">
5252
<head>

0 commit comments

Comments
 (0)