From c6c2b0f00e978b1d0288612ce624638b2cc287eb Mon Sep 17 00:00:00 2001 From: onemahmoudadel <117925036+onemahmoudadel@users.noreply.github.com> Date: Mon, 12 Feb 2024 19:01:13 +0200 Subject: [PATCH] add Installation step for next and astro readme.md --- readme.md | 110 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 109 insertions(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 4540506d..6f0aa6d5 100644 --- a/readme.md +++ b/readme.md @@ -8,12 +8,120 @@ Geist Sans is a sans-serif typeface designed for legibility and simplicity. It i Geist Mono is a monospaced typeface that has been crafted to be the perfect partner to Geist Sans. It is designed to be used in code editors, diagrams, terminals, and other textbased interfaces where code is represented. -### Installation +### Download Download the latest release from the [releases page](https://github.com/vercel/geist-font/releases/latest) and install the fonts on your system. * [Download Geist Sans](https://github.com/vercel/geist-font/releases/download/1.1.0/Geist.zip) * [Download Geist Mono](https://github.com/vercel/geist-font/releases/download/1.1.0/Geist.Mono.zip) +### Installation +#### Use in Next.js +GeistSans is exported from geist/font/sans, and GeistMono can be found in geist/font/mono. Both are NextFontWithVariable instances. You can learn more by [reading the next/font docs.](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) +```sh +npm install geist +``` + +##### App Router +In ```app/layout.js```: + +```js +import { GeistSans } from "geist/font/sans"; + +export default function RootLayout({ + children, +}) { + return ( + +
{children} + + ) +} +``` + +##### Pages Router +In ```pages/_app.js```: + +```js +import { GeistSans } from "geist/font/sans"; + +export default function MyApp({ Component, pageProps }) { + return ( +