Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineConfig } from 'astro/config';
import { defineConfig, fontProviders } from 'astro/config';
import db from '@astrojs/db';
import preact from '@astrojs/preact';
import sitemap from '@astrojs/sitemap';
Expand Down Expand Up @@ -31,7 +31,19 @@ export default defineConfig({
inlineStylesheets: 'always'
},
experimental: {
clientPrerender: true
clientPrerender: true,
fonts: [
{
provider: fontProviders.google({
experimental: { variableAxis: { Inter: { opsz: ['14..32'] } } }
}),
name: 'Inter',
cssVariable: '--astro-font-inter',
weights: ['300 900'],
styles: ['normal'],
subsets: ['latin']
}
]
},
image: {
remotePatterns: [
Expand Down
Binary file removed public/fonts/InterVariable.woff2
Binary file not shown.
9 changes: 2 additions & 7 deletions src/layouts/Layout.astro
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
import { Font } from 'astro:assets';
import { ClientRouter } from 'astro:transitions';
import { Schema } from 'astro-seo-schema';

Expand Down Expand Up @@ -93,13 +94,7 @@ const description = Astro.props.description ?? starpodConfig.description;

<link rel="preload" as="image" href={show.image} />

<link
crossorigin
rel="preload"
href="/fonts/InterVariable.woff2"
as="font"
type="font/woff2"
/>
<Font cssVariable="--astro-font-inter" preload />

<Schema
slot="head"
Expand Down
12 changes: 0 additions & 12 deletions src/styles/fonts.css

This file was deleted.

1 change: 0 additions & 1 deletion src/styles/global.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
@import './fonts.css';
@import './tailwind.css';
@import './gradient-icon.css';
@import './buttons.css';
Expand Down
2 changes: 1 addition & 1 deletion src/styles/tailwind.css
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
--color-light-text-body: oklch(59.68% 0.017 285.89);
--color-light-text-heading: oklch(30.55% 0.052 292.57);

--font-inter: Inter, sans-serif;
--font-inter: var(--astro-font-inter);
}

/*
Expand Down