Merge pull request #103 from zonghaoyuan/feat/selfhost-font-awesome

perf(web): self-host Font Awesome instead of cdnjs CDN
This commit is contained in:
Zonghao Yuan
2026-06-19 01:36:56 +08:00
committed by GitHub
3 changed files with 11 additions and 5 deletions
+1 -5
View File
@@ -5,6 +5,7 @@ import { Analytics } from "@/components/Analytics";
import { LOCALES, DEFAULT_LOCALE, type Locale } from "@/lib/i18n/config"; import { LOCALES, DEFAULT_LOCALE, type Locale } from "@/lib/i18n/config";
import { localePath } from "@/lib/i18n/navigation"; import { localePath } from "@/lib/i18n/navigation";
import { stripLocalePrefix } from "@/lib/i18n/navigation"; import { stripLocalePrefix } from "@/lib/i18n/navigation";
import "@fortawesome/fontawesome-free/css/all.min.css";
import "./globals.css"; import "./globals.css";
// Editorial fonts: drive tailwind `font-serif`/`font-sans` via // Editorial fonts: drive tailwind `font-serif`/`font-sans` via
@@ -61,11 +62,6 @@ export default async function RootLayout({
suppressHydrationWarning suppressHydrationWarning
> >
<head> <head>
{/* Font Awesome — fa-solid icons used by home, /play, /new, CustomForm. */}
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css"
/>
{LOCALES.map((l) => ( {LOCALES.map((l) => (
<link <link
key={l} key={l}
+1
View File
@@ -21,6 +21,7 @@
"deploy:cf": "opennextjs-cloudflare deploy" "deploy:cf": "opennextjs-cloudflare deploy"
}, },
"dependencies": { "dependencies": {
"@fortawesome/fontawesome-free": "6.5.1",
"@supabase/ssr": "^0.12", "@supabase/ssr": "^0.12",
"@supabase/supabase-js": "^2.108", "@supabase/supabase-js": "^2.108",
"drizzle-orm": "^0.45.2", "drizzle-orm": "^0.45.2",
+9
View File
@@ -8,6 +8,9 @@ importers:
.: .:
dependencies: dependencies:
'@fortawesome/fontawesome-free':
specifier: 6.5.1
version: 6.5.1
'@supabase/ssr': '@supabase/ssr':
specifier: ^0.12 specifier: ^0.12
version: 0.12.0(@supabase/supabase-js@2.108.1) version: 0.12.0(@supabase/supabase-js@2.108.1)
@@ -1003,6 +1006,10 @@ packages:
cpu: [x64] cpu: [x64]
os: [win32] os: [win32]
'@fortawesome/fontawesome-free@6.5.1':
resolution: {integrity: sha512-CNy5vSwN3fsUStPRLX7fUYojyuzoEMSXPl7zSLJ8TgtRfjv24LOnOWKT2zYwaHZCJGkdyRnTmstR0P+Ah503Gw==}
engines: {node: '>=6'}
'@img/colour@1.1.0': '@img/colour@1.1.0':
resolution: {integrity: sha512-Td76q7j57o/tLVdgS746cYARfSyxk8iEfRxewL9h4OMzYhbW4TAcppl0mT4eyqXddh6L/jwoM75mo7ixa/pCeQ==} resolution: {integrity: sha512-Td76q7j57o/tLVdgS746cYARfSyxk8iEfRxewL9h4OMzYhbW4TAcppl0mT4eyqXddh6L/jwoM75mo7ixa/pCeQ==}
engines: {node: '>=18'} engines: {node: '>=18'}
@@ -3893,6 +3900,8 @@ snapshots:
'@esbuild/win32-x64@0.28.1': '@esbuild/win32-x64@0.28.1':
optional: true optional: true
'@fortawesome/fontawesome-free@6.5.1': {}
'@img/colour@1.1.0': {} '@img/colour@1.1.0': {}
'@img/sharp-darwin-arm64@0.33.5': '@img/sharp-darwin-arm64@0.33.5':