Vendor the font
This commit is contained in:
parent
8158b6817e
commit
39f994fc0b
|
|
@ -1,15 +0,0 @@
|
||||||
diff --git a/src/app/[locale]/layout.tsx b/src/app/[locale]/layout.tsx
|
|
||||||
index 52feac9..f502906 100644
|
|
||||||
--- a/src/app/[locale]/layout.tsx
|
|
||||||
+++ b/src/app/[locale]/layout.tsx
|
|
||||||
@@ -7,9 +7,9 @@ import Head from 'next/head';
|
|
||||||
|
|
||||||
import { ThemeProvider } from "@/components/providers";
|
|
||||||
import { translations } from "@/i18n/translations";
|
|
||||||
-import { Oxanium } from "next/font/google";
|
|
||||||
+import localFont from "next/font/local";
|
|
||||||
import { headers } from "next/headers";
|
|
||||||
-const oxanium = Oxanium({ subsets: ["latin-ext"] })
|
|
||||||
+const oxanium = localFont({ src: './Oxanium.ttf' })
|
|
||||||
|
|
||||||
import type { Metadata } from 'next';
|
|
||||||
12
default.nix
12
default.nix
|
|
@ -5,24 +5,12 @@ in pkgs.buildNpmPackage {
|
||||||
version = package-json.version;
|
version = package-json.version;
|
||||||
src = ./.;
|
src = ./.;
|
||||||
|
|
||||||
patches = [ ./build-with-nix.patch ];
|
|
||||||
|
|
||||||
preBuild = ''
|
|
||||||
cp "${
|
|
||||||
pkgs.google-fonts.override { fonts = [ "Oxanium" ]; }
|
|
||||||
}/share/fonts/truetype/Oxanium[wght].ttf" src/app/\[locale\]/Oxanium.ttf
|
|
||||||
'';
|
|
||||||
|
|
||||||
npmDeps = pkgs.importNpmLock {
|
npmDeps = pkgs.importNpmLock {
|
||||||
npmRoot = ./.;
|
npmRoot = ./.;
|
||||||
};
|
};
|
||||||
|
|
||||||
npmConfigHook = pkgs.importNpmLock.npmConfigHook;
|
npmConfigHook = pkgs.importNpmLock.npmConfigHook;
|
||||||
|
|
||||||
nativeBuildInputs = with pkgs; [
|
|
||||||
keepBuildTree
|
|
||||||
];
|
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
cp -r public $out/
|
cp -r public $out/
|
||||||
mkdir $out/.next
|
mkdir $out/.next
|
||||||
|
|
|
||||||
BIN
src/app/[locale]/Oxanium.ttf
Normal file
BIN
src/app/[locale]/Oxanium.ttf
Normal file
Binary file not shown.
|
|
@ -7,9 +7,9 @@ import Head from 'next/head';
|
||||||
|
|
||||||
import { ThemeProvider } from "@/components/providers";
|
import { ThemeProvider } from "@/components/providers";
|
||||||
import { translations } from "@/i18n/translations";
|
import { translations } from "@/i18n/translations";
|
||||||
import { Oxanium } from "next/font/google";
|
import localFont from "next/font/local";
|
||||||
import { headers } from "next/headers";
|
import { headers } from "next/headers";
|
||||||
const oxanium = Oxanium({ subsets: ["latin-ext"] })
|
const oxanium = localFont({ src: './Oxanium.ttf' })
|
||||||
|
|
||||||
import type { Metadata } from 'next';
|
import type { Metadata } from 'next';
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue