Commit graph

25 commits

Author SHA1 Message Date
Jashn Maloo
7dec91175c
change anonymous functions to named in docs examples (#17510)
Fixes #17200
2020-10-05 21:16:47 +00:00
Gergo Tolnai
8fdb93d76f
Docs(api-middlewares): use typings for serialize options from @types/cookie (#17285) 2020-09-22 18:52:29 +00:00
Luis Alvarez D
333a9ea8ab
Documentation updates (#16503)
Fixes https://github.com/vercel/next.js/issues/16502

Check the issue for more details.
2020-08-24 02:23:12 +00:00
Bruno Bernardino
3bfc25db9f
Clarify optional catch all vs catch all routes (#15290)
Makes the difference between optional catch all routes and catch all routes clearer.

Closes #15229
2020-07-18 20:13:47 +00:00
Rafael Almeida
59f147387b
Document API Middlewares with TypeScript (#14275)
My attempt to clear things up 😅

cc @Timer
2020-07-16 05:03:48 +00:00
Ben Botvinick
87ce591014
Change default response code to 307 from 302 in docs (#14947) 2020-07-07 21:36:16 -04:00
Ben Botvinick
d19c34353d
Add res.redirect response helper (#14705)
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
2020-07-07 01:06:16 -04:00
Joe Haddad
1d0e7a8a9a
Enable Optional Catch-All by Default (#14687)
Closes #14682
2020-06-29 18:50:32 +00:00
Joe Haddad
f49309a92e
docs([[...rest]]): add experimental banner (#13641)
This feature is still experimental.
2020-06-01 22:51:57 +00:00
Joe Haddad
b7e17e09e5
Update references to zeit/next.js (#13463) 2020-05-27 17:51:11 -04:00
Joe Haddad
86160a5190
Upgrade to Prettier 2 (#13061) 2020-05-18 15:24:37 -04:00
Jan Potoms
f8125c9ed7
[Experimental] Implement optional catch all routes (#12887) 2020-05-18 09:47:13 -04:00
Pablo Saez
dac715e8f7
Add flag to disable API warning (#11380)
* Add flag to disable API warning

This flag is useful when you are using an external API resolver like express when defining an API route, since the native functionality doesn't realize that the API actually sent a response.

A very simple use case example https://github.com/PabloSzx/next-external-api-resolver-example

fixes #10589

* Update api-middlewares.md

Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
2020-05-07 14:05:41 +02:00
Luis Alvarez D
82596124c6
Add cors example and update API routes docs (#12390) 2020-05-02 00:06:23 -04:00
Vitor Capretz
26df01800d
docs: improve wording on some pages according to alex.js (#11973) 2020-04-17 16:26:25 +02:00
Sriram Thiagarajan
892794b013
[docs] Remove broken link to example api-routes-micro (#11597) 2020-04-02 17:22:12 +02:00
swyx
4adab3d4b0
[docs] document how root routes coexist with dynamic api routes (#11591)
* document how root routes coexist with dynamic api routes

document how root routes coexist with dynamic api routes - related to https://github.com/zeit/next.js/issues/11542

* Update dynamic-api-routes.md

* Update dynamic-api-routes.md

* Run prettier

Co-authored-by: Tim Neutkens <timneutkens@me.com>
2020-04-02 11:05:01 +02:00
Jeremy Stucki
a81d7620a4
docs: Replace micro-cors with cors middleware (#11395) 2020-03-27 13:23:53 +01:00
Tim Neutkens
3e1ace37af
Update API routes documentation to correctly mention middlewar… (#11083)
Previously we said "Micro middlewares" but Next.js does not use micro. This would confuse users as both Next.js and Micro were created by ZEIT and Next.js API routes have different semantics than Micro handlers.

I've updated the docs to show how to use the `cors` middleware that's generally used in express apps.
2020-03-17 09:52:23 +01:00
Luis Alvarez D
c5eb535229
[Docs] Apply updates based on feedback (#10352)
* Expand on the docs for the serverless target

* Added catch all routes to API docs

* Added caveat for catch all routes

* Added link to Rauch's post about serverless

* Add mention of `lang`

* Add create-next-app to docs

* Updated dynamic import examples to be more descriptive

* Even better

* Clarify valid catch all routes

* Removed unexpected word

* Apply suggestions from Joe

Co-Authored-By: Joe Haddad <joe.haddad@zeit.co>

* Keep #setup

Co-Authored-By: Joe Haddad <joe.haddad@zeit.co>

* Updated docs for the serverless target

* Apply suggestions from code review

Co-Authored-By: Shu Uesugi <shu@chibicode.com>

* Update docs/getting-started.md

Co-Authored-By: Shu Uesugi <shu@chibicode.com>

* Added suggestion from chibicode

Co-authored-by: Joe Haddad <timer150@gmail.com>
Co-authored-by: Shu Uesugi <shu@chibicode.com>
2020-02-12 15:19:58 -05:00
Luis Alvarez D
f24aa41440
Updated docs (#10213) 2020-01-22 14:30:55 -05:00
Luis Alvarez D
7fc850e28a [docs] Added related links to next.config.js (#10174)
* Added related links

* Added missing dots
2020-01-20 21:40:20 +01:00
Lee Robinson
b533f2afab Fix typo in API Routes documentation. (#10054)
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2020-01-12 13:12:59 -06:00
Luis Alvarez D
d1fdd2bbf8 Add descriptions to documentation pages (#9901)
* Added descriptions

* Added descriptions to API Reference

* Added descriptions to API Routes

* Added descriptions to basic features

* Added descriptions to the routing docs

* Update exportPathMap.md

Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-01-03 13:16:51 -05:00
Luis Alvarez D
e3465615e4 New docs (#9301)
* Added the docs from Notion

* Updated the links from notion to relative links

* Added a routes manifest to the docs

* Removed the <br> after examples toggle

* Use the name of the section instead of Introduction

* Fixed spelling errors

* Optimize the content for Algolia

* Add a paragraph for `pageProps`

* Add welcome section

* Transpile -> Compile

* Update getting-started.md

* Update getting-started.md

* Update getting-started.md

* Update getting-started.md

* Update getting-started.md

* Update getting-started.md

* Update getting-started.md

* Update getting-started.md

* Update getting-started.md

* Update getting-started.md

* Test extra room between

* Update getting-started.md

* Update getting-started.md

* Update getting-started.md

* Update getting-started.md

* Update getting-started.md

* Update manifest.json

* Update getting-started.md

* Update getting-started.md

* Add concepts section

* Update pages.md

* Update pages.md

* Add data fetching section

* Update pages.md

* See how a card looks like

* Undo card changes

* Added related section to getting-started

* Fixed wrong markdown syntax in the withRouter page

* Moved the server-side-and-client-side section

* Updated next-cli reference

* updated getInitialProps section

* Minor fixes

* Added more Related sections

* Add html to the related section in getting-started

* Use small for the card

* Use cards for all related sections

* Added src directory docs

* Added src directory to the manifest

* Add note about API routes in next export

* Add initial data fetching docs (private until new methods are released)

* Fix typos

* Improve wording

* Update getting-started.md

* Update getting-started.md

* Move advanced concepts to advanced section

* Hide server-side vs client-side

* Move AMP support

* Move typescript into one page

* Add routing concepts page

* Remove introduction page

* Update section on different route types

* Update routing.md

* Update routing.md

* Update routing.md

* Update routing.md

* Combine router injection pages

* Update pages.md

* Update routing.md

* Update using-link.md

* Update using-link.md

* Update typescript.md

* Move the API Routes typescript to basic features

* Added links to the typescript section

* Updated links to useRouter and withRouter

* Add singleLevel prop to manifest

* Added single page for router docs

* Updated description

* Updated the routes in the manifest

* Add data fetching section

* Update data-fetching.md

* Update data-fetching.md

* Update dynamic-routes.md

* Update manifest.json

* Only use the single router API page

* Moved the concepts pages

* Updated links

* Removed extra space

* Updated title for Router API

* Added a description with frontmatter

* Add open prop to the manifest

* Added datafetching section to API Reference

* Updated links to the getInitialProps reference

* Moved some sections to API

* Added next/head to API reference

* Added next/link to the API Reference

* Removed the populating-head section

* Updated links to the new next/link API

* Added link from dynamic-routes to next/link docs

* use a paragraph

* Added next/router API

* Added next/amp

* Updated the docs for next/amp

* Moved the AMP support folder

* Updated title

* Content updates

* Added more links to the data fetching section

* Added links from the API to introductions

* changing the router API

* Updates to the router API

* Updated the routing section

* life improvements

* Added shallow routing section

* Small fix

* Removed old routing sections

* Updated link to shallow routing

* Removed unrequired page

* Removed /pages

* Update data-fetching.md

* Add initial deployments section

* Update manifest.json

* Update introduction.md

* Update deployment doc

* Add static export section updates

* link ssg/ssr

* Update deployment.md

* Add syntax highlighting

Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
2019-12-23 16:07:38 +01:00