-
Notifications
You must be signed in to change notification settings - Fork 27.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update font optimization page #42266
Conversation
@@ -107,14 +107,14 @@ For usage, review [Local Fonts](/docs/optimizing/fonts#local-fonts). | |||
|
|||
### `src` | |||
|
|||
The path of the font file as a string relative to the directory where the font loader function is called or to the `app` directory. | |||
The path of the font file as a string relative to the directory where the font loader function is called or to the `pages` directory. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The path of the font file as a string relative to the directory where the font loader function is called.
This is correct
or to the
pages
directory.
It's always relative to where it's called.
// app/layout.tsx | ||
import { Roboto } from '@next/font/google' | ||
```js:pages/_app.js | ||
import { Roboto } from '@next/font/google'; | ||
|
||
const roboto = Roboto({ | ||
weight: '400', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing multiple weights/styles in API reference for both google and local.
Co-authored-by: Delba de Oliveira <[email protected]>
Fixes syntax errors introduced in #42266 ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have a helpful link attached, see `contributing.md` ## Feature - [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. - [ ] Errors have a helpful link attached, see `contributing.md` ## Documentation / Examples - [ ] Make sure the linting passes by running `pnpm build && pnpm lint` - [ ] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md) Co-authored-by: JJ Kasper <[email protected]>
Update to using
pages/
instead ofapp/
Bug
fixes #number
contributing.md
Feature
fixes #number
contributing.md
Documentation / Examples
pnpm build && pnpm lint