feat: configure basePath from env and update font strategy

This commit is contained in:
2026-05-16 10:02:11 +07:00
parent 1a13083fc5
commit e652279b41
7 changed files with 74 additions and 21 deletions
+14 -1
View File
@@ -3,6 +3,8 @@ import "../public/assets/css/all.min.css";
import "./globals.css";
import { LanguageProvider } from "@/app/context/LanguageContext";
const basePath = process.env.NEXT_PUBLIC_BASE_PATH || "";
export const metadata: Metadata = {
metadataBase: new URL(process.env.NEXT_PUBLIC_BASE_URL || "http://localhost:3000"),
title: "IPv6 Summit 2026 | Infrastructure for AI",
@@ -14,14 +16,25 @@ export default function RootLayout({ children }: { children: React.ReactNode })
return (
<html lang="en">
<head>
{/* Nasalization font — path prefixed with basePath for subdirectory deployments */}
<style dangerouslySetInnerHTML={{ __html: `
@font-face {
font-family: "Nasalization";
src: url("${basePath}/assets/webfonts/Nasalization Rg.otf") format("opentype");
font-weight: normal;
font-style: normal;
font-display: swap;
}
`}} />
{/* Fonts */}
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossOrigin="anonymous" />
<link
href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600;700&family=Geist:wght@400;600&family=JetBrains+Mono:wght@400;500&display=swap"
href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&family=Space+Grotesk:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600;700&family=Geist:wght@400;600&family=JetBrains+Mono:wght@400;500&display=swap"
rel="stylesheet"
/>
{/* Icons */}
<link rel="icon" href={`${basePath}/assets/img/tech-logo.png`} type="image/png" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"