Skip to content
Merged
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
44 changes: 0 additions & 44 deletions docs/01-app/01-getting-started/13-fonts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -89,50 +89,6 @@ export default function MyApp({ Component, pageProps }) {
}
```

If you want to apply the font to the `<html>` element, you can use a [Custom Document](/docs/pages/building-your-application/routing/custom-document) (`pages/_document`):

```tsx filename="pages/_document.tsx" highlight={2,4-6,10} switcher
import { Html, Head, Main, NextScript } from 'next/document'
import { Geist } from 'next/font/google'

const geist = Geist({
subsets: ['latin'],
})

export default function Document() {
return (
<Html lang="en" className={geist.className}>
<Head />
<body>
<Main />
<NextScript />
</body>
</Html>
)
}
```

```jsx filename="pages/_document.js" highlight={2,4-6,10} switcher
import { Html, Head, Main, NextScript } from 'next/document'
import { Geist } from 'next/font/google'

const geist = Geist({
subsets: ['latin'],
})

export default function Document() {
return (
<Html lang="en" className={geist.className}>
<Head />
<body>
<Main />
<NextScript />
</body>
</Html>
)
}
```

</PagesOnly>

## Google fonts
Expand Down
Loading