Skip to content

Commit 711f9fb

Browse files
committed
fix(perf): Import CSS URL for preload instead of using /src/ path
1 parent 780edc5 commit 711f9fb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/starlight-overrides/Head.astro

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import Default from "@astrojs/starlight/components/Head.astro";
44
import { Schema } from "astro-seo-schema";
55
import { Font } from "astro:assets";
66
import TextSizeProvider from "../components/TextSizeProvider.astro";
7+
import globalCssUrl from "../styles/global.css?url";
78
import { SUPPORTED_LANGUAGES } from "~/config/18n";
89
import { getImageUrl } from "~/lib/og-image/getImageUrl";
910
@@ -96,7 +97,7 @@ const lastUpdatedDate = lastUpdated ? lastUpdated.toISOString() : new Date().toI
9697

9798
<link rel="preconnect" href="https://api.testnet.staging.aptoslabs.com" />
9899
<link rel="dns-prefetch" href="https://api.testnet.staging.aptoslabs.com" />
99-
<link rel="preload" href="/src/styles/global.css" as="style" />
100+
<link rel="preload" href={globalCssUrl} as="style" />
100101

101102
<Schema
102103
item={{

0 commit comments

Comments
 (0)