Skip to content
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

Merged
merged 7 commits into from Nov 2, 2022

Conversation

ismaelrumzan
Copy link
Contributor

Update to using pages/ instead of app/

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

@@ -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.
Copy link
Contributor

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',
Copy link
Contributor

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.

delbaoliveira
delbaoliveira previously approved these changes Nov 1, 2022
docs/basic-features/font-optimization.md Outdated Show resolved Hide resolved
@vercel vercel bot temporarily deployed to Preview – next-js-blog-viye-lzn3 November 1, 2022 15:54 Inactive
@vercel vercel bot temporarily deployed to Preview – next-js-examples-e8pw November 1, 2022 15:54 Inactive
Co-authored-by: Delba de Oliveira <32464864+delbaoliveira@users.noreply.github.com>
@vercel vercel bot temporarily deployed to Preview November 2, 2022 13:37 Inactive
@vercel vercel bot temporarily deployed to Preview November 2, 2022 14:06 Inactive
@timneutkens timneutkens merged commit 468f2c4 into vercel:canary Nov 2, 2022
@chibicode chibicode mentioned this pull request Nov 3, 2022
11 tasks
kodiakhq bot pushed a commit that referenced this pull request Nov 3, 2022
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 <22380829+ijjk@users.noreply.github.com>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
created-by: Next.js docs team PRs by the Next.js docs team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants