fix: remove Font component and fontProviders (esbuild parse error)
The Font component with spread syntax caused esbuild parse error at Base.astro line 64. Replaced with direct Google Fonts link tag. Also removed fonts[] array from astro.config.mjs since we're loading Inter via <link> tag instead. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
import { getMenu, getSiteSettings } from "emdash";
|
||||
import { EmDashHead } from "emdash/ui";
|
||||
import { createPublicPageContext } from "emdash/page";
|
||||
import { Font } from "astro:assets";
|
||||
import "../styles/theme.css";
|
||||
|
||||
interface Props {
|
||||
@@ -41,10 +40,12 @@ const pageCtx = createPublicPageContext({
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>{fullTitle}</title>
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap" rel="stylesheet" />
|
||||
{siteFavicon && <link rel="icon" href={siteFavicon} />}
|
||||
{description && <meta name="description" content={description} />}
|
||||
<EmDashHead emdash={Astro.locals.emdash} pageContext={pageCtx} />
|
||||
<Font ...{({ variable: "--font-sans", provider: { type: "google", name: "Inter" } })} />
|
||||
</head>
|
||||
<body>
|
||||
<header class="site-header">
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
--color-warning: #f59e0b;
|
||||
|
||||
/* --- Typography --- */
|
||||
--font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;
|
||||
--font-mono: ui-monospace, "SF Mono", monospace;
|
||||
--font-mono: ui-monospace, "SF Mono", monospace;
|
||||
--font-size-xs: 0.75rem;
|
||||
--font-size-sm: 0.875rem;
|
||||
|
||||
Reference in New Issue
Block a user