Commit graph

24 commits

Author SHA1 Message Date
Julien Bouquillon
71f08ef873
docs: fix typo (#53100)
just a typo in next/jest docs
2023-07-29 07:12:33 +00:00
Aryan Malik
4cb14b5110
Fix grammatical error in docs (#53197)
Changed 'created' to 'create' for improved grammar and clarity in the documentation.

Find it under `Custom App`
[https://nextjs.org/docs/pages/building-your-application/routing/custom-app](url)
2023-07-26 13:25:25 +00:00
Daniel
84197ece65
chore(docs): client-side data fetching loading state (#53164)
setLoading must be "true" at first and then set to "false". The documentation, as is, always has the value of setLoading set to "false".

The purpose of this code is to show "...loading" on the screen while the data is being fetched. In order for this to happen, setLoading must be initially set to "true" and then (after the data is successfully loaded) set to "false", since the line `if (isLoading) return <p>Loading...</p>` is asking if the content is still loading, and if it is, it'll return a message indicating it.

Because of this

### What?
setLoading should be set to "true" at first.

### Why?
Because the code then asks if the content is being loaded. The code (as is) always has setLoading set as "false" and it doesn't show the loading message when it's supposed to.

### How?
I changed the line to `const [isLoading, setLoading] = useState(true)`.




Co-authored-by: Steven <229881+styfle@users.noreply.github.com>
2023-07-25 16:49:40 +00:00
Paul Barry
85676da42c
chore(docs): Extend the options for custom server init (#52851)
## For Contributors

### Improving Documentation

While working with a custom server, I noticed that [the list of available options within the codebase](https://github.com/vercel/next.js/blob/canary/packages/next/src/server/base-server.ts#L138-L180) was much larger than [the options listed within the docs](https://nextjs.org/docs/pages/building-your-application/configuring/custom-server). This PR extends the `next` import function options to include all of ~the allowed~ documented options from the codebase. 

- [x] Run `pnpm prettier-fix` to fix formatting issues before opening the PR.
- [x] Read the Docs Contribution Guide to ensure your contribution follows the docs guidelines: https://nextjs.org/docs/community/contribution-guide




Co-authored-by: Lee Robinson <9113740+leerob@users.noreply.github.com>
2023-07-23 17:25:07 +00:00
Heidar-An
732219e9df
Update 02-dynamic-routes.mdx (#52975)
grammatical mistake

### What?
Small grammatical mistake on https://nextjs.org/docs/pages/building-your-application/routing/dynamic-routes
2023-07-21 17:08:52 +00:00
Lee Robinson
c6b163f3c5
docs: Update _app and _document (#52479)
- Remove specific TypeScript sections and add JS/TS code block toggles
- Consolidate "Good to know" information into sections
- Add links back to incrementally adopting the App Router when trying to
use escape hatches
- Add better TS example for `getInitialProps` (even tho it's not
recommended, still helpful)
2023-07-10 11:29:17 +02:00
Luc Gagan
399fa9cfa9
docs: Add Playwright/Cypress Discord links (#52084) 2023-07-09 15:53:54 -07:00
Paul Ostrouskiy
b0e4d8e447
[Docs] remove unnecessary dot. (#52387)
There's unneeded dot in a sentance
2023-07-07 14:50:25 +02:00
Steven
941757ffae
chore(docs): remove "Legacy" from Preview Mode (#52284)
[Some readers](https://twitter.com/madebymutual/status/1676515579362942976 ) are confused about the docs using the term [Legacy](https://en.wikipedia.org/wiki/Legacy_system) thinking it means [Deprecated](https://en.wikipedia.org/wiki/Deprecation).

Preview Mode only exists in Pages Router so technically both are legacy, but we don't need to call out Preview Mode specifically as legacy since we don't do that for any other Pages Router feature.

This PR removes the term "Legacy" to avoid confusion.
2023-07-05 20:23:27 +00:00
Timothy Vernon
0759104287
Docs: Fix broken link (#51991)
Link leads to a 404 page
2023-06-29 20:39:49 +00:00
Tyler Lutz
1f19a5b810
Add separate links in shared documentation (#51733)
### What?
- Added separate links for the app and pages router in the shared documentation.
- Added comment at the top of all shared documentation.
- Fixed typos in pages documentation comment.

### Why?
- To limit the switching between the different routers in shared documentation when clicking the links.
2023-06-28 23:37:56 +00:00
Luca Steeb
6d0d5e313b
docs(deploy): fix GitHub Actions cache key (#51789)
The specified default cache key `**.[jt]s` does not consider any files
in
folders, while `**/*.[jt]s` recursively includes all files.
The same goes for jsx/tsx.

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2023-06-25 13:28:02 -07:00
Tyler Lutz
df0612adf5
docs: Add 'DO NOT EDIT' comment (#51600)
### What?

Adds missing "DO NOT EDIT" comment to some of the shared documentation pages"

### Why?

A few of the shared documentation files didn't have the comment to not edit them.
2023-06-22 16:54:52 +00:00
Sonam Serchan
5936213e74
docs: link to caching heading for production docs. (#51501) 2023-06-19 07:47:48 -07:00
Jon Meyers
3cac09790b
examples: update with-supabase example to App Router (#51335)
### What?

Update Next.js with Supabase example

### Why?

Existing example for Next.js with Supabase is out of date

### How?

- Rename `with-supabase-auth-db-realtime` to `with-supabase`
- Update example to use App Router
- Use Supabase Auth Helpers for Next.js to configure auth cookies

---------
2023-06-16 06:16:42 -07:00
Jan Cizmar
0a9148901b
docs: Add Tolgee to internationalization section (#49754)
It would be nice to have Tolgee listed in internationalization libs
supporting Next.JS

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2023-06-13 18:50:11 -07:00
Delba de Oliveira
6431b19906
Fix broken link (#51253)
Fix broken link in client-side rendering page
2023-06-13 13:08:19 -05:00
Delba de Oliveira
8a0686e28d
[Docs] Add version history to app api pages (#51218) 2023-06-13 18:03:27 +00:00
Delba de Oliveira
a3344ad6fc
[Docs] Add mininum client-side rendering page (#51220) 2023-06-13 12:16:29 -05:00
Delba de Oliveira
a611641cec
[Docs] Remove extra line in summary dropdowns (#51226)
They were causing markdown to render a <p> tag which has margins and broke the summary dropdowns
2023-06-13 13:50:20 +00:00
Michael Novotny
cefdb27662
docs: Adds Note to Good to know consistency (#51080)
* Changes all `Note` → `Good to know`
* Consistently puts the colon on the outside of bold text
* Documents singe and multi-line styles in contribution guide

---------

Co-authored-by: Delba de Oliveira <32464864+delbaoliveira@users.noreply.github.com>
2023-06-12 19:00:07 -07:00
Michael Novotny
a973ad64d4
Makes codeblock language and filename extensions consistent (#51056)
There was mismatched usage of `js`, `jsx`, `ts`, and `tsx`. Just tried to get them all in sync.
2023-06-12 18:55:08 +00:00
Delba de Oliveira
ccc64d96b6
[Docs] Remove html <b> from summaries (#51008)
This PR removes manual HTML `<b>` tags in `<details><summary>...` titles. They are unnecessary because we add bold styling in CSS.

Also did a tiny fix to some other unnecessary inline HTML.
2023-06-09 22:12:58 +00:00
Delba de Oliveira
f4f34e4226
[Next Docs] Migrate new docs from next-site to Next.js repo (#50701) 2023-06-08 12:03:14 +02:00