Commit graph

180 commits

Author SHA1 Message Date
Iurii Kucherov
99f2d2a109 Add a note for multiple dynamic route segments (#8359)
* Update README.md

* Update README.md

* Update README.md

* Update README.md
2019-08-13 21:35:27 -04:00
JJ Kasper
9fe95b5c7d Add note explaining empty query during prerendering (#8351) 2019-08-13 19:58:45 +02:00
Borek Bernard
4ab56e8a8a Update custom app example in README (#8320)
The code example now uses simpler and safer approach to call page's `getInitialProps`.
2019-08-12 00:06:45 +02:00
Tim Neutkens
a90a55545b
Deprecate Container usage (#8327)
* Remove Container from examples

* Update readme to reflect Container removal
2019-08-11 22:02:33 +02:00
Tim Neutkens
da494dbb80 Document poweredByHeader option
Fixes #7657
2019-08-10 15:44:43 +02:00
JJ Kasper
a4889f964e
Update handling of ref in next/link (#8254) 2019-08-08 13:11:17 -05:00
Delba de Oliveira
484f988a3a Update README.md (#8282) 2019-08-08 15:31:28 +02:00
Lukáš Huvar
beed65be40 Compression documentation (#8247)
* Documentation about gzip

* Update packages/next/README.md

Co-Authored-By: Tim Neutkens <tim@timneutkens.nl>

* Improve docs

* Update packages/next/README.md

Co-Authored-By: Luis Fernando Alvarez D. <luis@zeit.co>

* Update packages/next/README.md

Co-Authored-By: Luis Fernando Alvarez D. <luis@zeit.co>

* Update README.md
2019-08-06 13:49:53 +02:00
Natalie Marleny
487d62b132 [Enhancement]: Update README buttons (#8235)
* Update CN README for consistency

* Add buttons to README.md

* Center nextjs learn text

* Update CN README for consistency

* fix README link in README-zh-CN.md
2019-08-04 14:33:15 +01:00
Tim Neutkens
48e1d14d30
Update README.md 2019-08-03 23:16:34 +01:00
Joe Haddad
91b06c752a Add Create Next App instructions (#8224) 2019-08-03 12:25:25 +01:00
Joe Haddad
6468b6c9bf
Remove useless code block in docs 2019-08-01 18:49:47 -04:00
Joe Haddad
ac31f1636e
Add some notes about Now deployment (#8205) 2019-08-01 11:08:21 -04:00
Joe Haddad
3f2027d583
Update TypeScript Instructions (#8200)
* Update TypeScript Instructions

* next dev => npm run dev

* Break line
2019-08-01 09:13:17 -04:00
Gabor Ottlik
72098328cf Fix a typo in README (#8177) 2019-07-30 16:17:26 +01:00
Lukáš Huvar
722d5d7703 Improve docs for API (#8155)
* Move API types to API section

* Improve wording
2019-07-29 10:29:17 +01:00
Youkyoung.Park
c4704fbd9e fix spelling in tsconfig.js of readme.md (#8138) 2019-07-27 16:50:14 +01:00
Sergio Garcia Mondaray
eae1f6b749 Dynamic routes clarification (#8110)
As talked in https://github.com/zeit/next.js/issues/8101 dynamic routing documentation could be confusing. This PR tries to clarify it a bit.
2019-07-25 17:07:59 +00:00
Lukáš Huvar
3ee5ec4412 Configuration for body parsing size limit (#7896)
This PR introduces the possibility to change the size of the parsed body. This brings features like:
- Adjusting the size of the incoming message
- Better security
2019-07-25 15:43:55 +00:00
Lukáš Huvar
83a3903fc2 HTTP methods docs and REST example (#8108)
* HTTP methods docs and REST example

* Update packages/next/README.md

Co-Authored-By: Joe Haddad <timer150@gmail.com>

* Update examples/api-routes-rest/README.md

Co-Authored-By: Joe Haddad <timer150@gmail.com>

* Fix standard
2019-07-25 11:18:38 -04:00
ikeryo1182
6faf0d18fb Fix userAgent type error in README.md (#8048) 2019-07-22 11:17:07 -05:00
Joe Haddad
7eed8380f1 Comment out GIP in Custom <App> (#8055) 2019-07-22 09:54:26 -05:00
Luis Fernando Alvarez D
34a9cddfe1 Rework dynamic routing <Link> documentation (#8001) 2019-07-16 12:26:01 -07:00
Adam Wathan
0b496a45e8
Import isomorphic-unfetch in data fetching example (#7895)
Following this example confused me at first because it looked like it was using native fetch, and when that didn't work server-side I wasn't sure if that was my mistake or an issue with the docs.
2019-07-16 12:35:32 -04:00
Jack Tomaszewski
17773a6203 Correct info about export limitations (#7729)
* Correct info about export limitations

In `next export` `req` and `res` objects are present, but they are empty ( https://github.com/zeit/next.js/blob/master/packages/next/export/worker.js#L42-L43 ).

* Update README.md
2019-07-16 13:38:17 +02:00
Lukáš Huvar
be3eab2ad7 Example for API routes with middleware (#7958) 2019-07-15 17:39:16 +02:00
Sudhir Mitharwal
9b7a2f5ab4 Update docs for AMP export behavior (#7940)
In versions prior to ^9, default export with AMP was to create a
`index.html` file for each page. This has changed in ^9.0 with intruduction of a new
configuration options `exportTrailingSlash`. Current docs for AMP
exports are not correct for this behaviour.

Fixes #7931
2019-07-12 12:53:06 -07:00
Joe Haddad
a7fbd308be
Adjust README to mention Link 2019-07-11 16:25:35 -04:00
Joe Haddad
ce8956aeda
Miscellaneous doc updates (#7831)
* Runtime config is not compatible w/ prerendering

Closes https://github.com/zeit/next.js/issues/7827

* Add req and res types

* Document using CORS
Closes https://github.com/zeit/next.js/issues/7805

* Add docs about GIP and Prerendering

Closes https://github.com/zeit/next.js/issues/7786

* set => provided

* Note by default

* Ref CORS doc

* Specify empty object
2019-07-09 09:24:29 -04:00
sharils
aac4e21d46 Reduce confusion about passing an object to push (#7818) 2019-07-09 13:34:11 +02:00
Praveen Senadheera
432eec2aec Fix small typo in TypeScript documentation (#7820) 2019-07-09 01:18:28 -04:00
Joe Haddad
3f56bc5092
Update docs about Automatic Prerendering (#7816)
* Update docs about Automatic Prerendering
Closes https://github.com/zeit/next.js/issues/7791

* Tweak layout

* Fix review from @ijjk

* Revise wording

* Simplify note since we note this below

* Update packages/next/README.md

Co-Authored-By: JJ Kasper <jj@jjsweb.site>
2019-07-08 23:41:26 -04:00
Joe Haddad
3208024735
Undocument the public/ folder (#7810)
Closes https://github.com/zeit/next.js/issues/7800
2019-07-08 20:12:40 -04:00
Delba de Oliveira
4172c894d3 Further clarification that api routes should be inside the page… (#7780) 2019-07-08 16:28:58 +02:00
Lukáš Huvar
264fc01969 API routes documentation (#7562)
* API routes examples and documentation

* Update examples/api-routes-micro/README.md

Co-Authored-By: Luis Fernando Alvarez D. <luis@zeit.co>

* Update examples/api-routes/README.md

Co-Authored-By: Luis Fernando Alvarez D. <luis@zeit.co>

* Apply suggestions from code review

Co-Authored-By: Luis Fernando Alvarez D. <luis@zeit.co>

* Update API routes docs

* Improve example to reflect dynamic routes

* Update readme to reflect API routes changes

* Apply suggestions from review
2019-07-07 23:04:04 -07:00
Joe Haddad
270d548d33
Remove old docs (#7760)
* Remove old docs

* Run doctoc
2019-07-05 12:01:21 -04:00
Lukáš Huvar
a60da57453 Clarify params and query merging (#7744)
* Clarify params and query merging

* Tweak README per @ijjk
2019-07-03 16:08:50 -04:00
Joe Haddad
b2a9670ca4
Make exportTrailingSlash stable (#7746) 2019-07-03 13:25:44 -04:00
Joe Haddad
e36d7b3226
Add example route event code (#7745) 2019-07-03 11:34:41 -04:00
Joe Haddad
e798b664a1
Add router event note (#7736)
* Add router event note

* Add line break

* Tweak wording
2019-07-02 21:35:38 -04:00
Joe Haddad
7439a773b0 Nit: Change Pre-render to Prerender (#7733) 2019-07-02 22:51:12 +02:00
Luis Fernando Alvarez D
c8bd427193 Dynamic routing documentation (#7602)
* Added basic example for dynamic routing

* Added some basic docs for dynamic routing

* Added more docs for dynamic routing

* Used doctoc

* fixed lint issues

* Added useRouter to docs

* Removed getInitialProps examples that are only using router props

* Added useRouter to the navigation

* Small fix

* Updated to the latest dynamic routes implementation

* lint fix

* Update dynamic routing example

* Tweak dynamic routing documentation

* Make basic example basic again

* Adjust dynamic routes section

* Remove query param for dynamic routes example

* Remove old note

* Fix linting
2019-07-02 16:00:58 -04:00
Luis Fernando Alvarez D
87610ccff5 Update with-zones example and Multi Zones documentation (#7513)
* Updated with-zones example to Now V2

* Updated Zones docs

* Update packages/next/README.md

Co-Authored-By: Tim Neutkens <tim@timneutkens.nl>
2019-07-01 15:21:00 -07:00
Joe Haddad
c92e8c2a09
Remove "small" wording from runtime config overhead (#7715)
Using runtime configuration can cause you to de-optimize entire classes of optimizations.
These optimizations could make your application an order of magnitude faster (i.e. prerendering).
2019-07-01 11:09:09 -04:00
Luis Fernando Alvarez D
e35053e8c3 Improve prefetch docs (#7692)
* added docs for disabling prefetch

* Update packages/next/README.md

Co-Authored-By: JJ Kasper <jj@jjsweb.site>
2019-06-28 13:57:22 -07:00
JJ Kasper
cf9762e089
Expand automatic pre-rendering docs (#7702)
* Expand automatic pre-rendering docs

* Apply suggestions from code review

Co-Authored-By: Luis Fernando Alvarez D. <luis@zeit.co>
2019-06-28 13:47:55 -07:00
JJ Kasper
5f40306575 Remove coveralls (#7689) 2019-06-28 09:09:27 -04:00
Luis Fernando Alvarez D
a71cb644b5 Improve docs (#7564)
* Update getInitialprops docs

* Update docs for prefetch

* Updated prefetch docs

* Removed hotSelfAccept from docs and othr changes

* Prefer /public

* dots dots dots dots

* Added docs for Automatic Pre-rendering

* Added a note to <Link />

* Removed 404 example

* Added references for Automatic pre-rendering

* Added a typescript section for AMP

* Executed doctoc again to add AMP sections

* Properly explain automatic pre-rendering

* Switch back to LF

* Apply corrections

Co-Authored-By: Joe Haddad <timer150@gmail.com>

* Minor corrections

* Added back some periods

* Added back some periods
2019-06-14 11:48:57 -07:00
JJ Kasper
fa45fa0a60
Add export const config support and make withAmp a no-op (#7525)
* Add export const config support and make withAmp a no-op

* Use babel plugin for PageConfig

* Fix serverless-loader exports

* Add backwards compatibility for withAmp
2019-06-09 17:16:14 -07:00
Faris Abusada
890a45616d fixes constants link in readme (#7534) 2019-06-08 17:35:02 +02:00
Tim Neutkens
e49e442796
Clean up _document documentation (#7523) 2019-06-06 15:09:20 +02:00
JJ Kasper
03d589349a
Render valid optimized AMP by default (#7465)
* Upgrade to latest AMP toolbox optimizer

* Remove amphtml from AMP only and update tests

* Update tests

* Apply suggestions from code review

Co-Authored-By: Joe Haddad <timer150@gmail.com>
2019-05-29 19:53:41 -07:00
Tim Neutkens
3e51ddb8af
Move syntax formatting to prettier (#7454)
* Run prettier over packages/**/*.js

* Run prettier over packages/**/*.ts

* Run prettier over examples

* Remove tslint

* Run prettier over examples

* Run prettier over all markdown files

* Run prettier over json files
2019-05-29 13:57:26 +02:00
keustma
eee19788e5 Fixed typo in README.md (#7438) 2019-05-28 14:01:46 +02:00
Nat Welch
3f91f80ede
Allow passing of title to default error page (#7381)
* Allow passing of title to default error page

* Update README to include Error#title information

* Change title init location

* Update _error.js
2019-05-27 12:22:14 -07:00
JJ Kasper
4718bd675f Document useAmp in readme (#7405) 2019-05-22 09:31:08 -07:00
Shu Uesugi
36abf81518 Update readme to use @next/mdx (#7291)
* Update readme to use @next/mdx
2019-05-09 17:15:20 -05:00
Lukáš Huvar
37ebd61b87
Update styling of TypeScript config 2019-05-09 11:53:28 +02:00
Tim Neutkens
150234284c
Add initial docs for TypeScript (#7169)
* Add initial docs for typescript

* Update packages/next/README.md

Co-Authored-By: timneutkens <tim@timneutkens.nl>

* Update docs

* Update packages/next/README.md

* Update packages/next/README.md

* Update README.md
2019-05-08 12:09:02 +02:00
Luis Fernando Alvarez D
3a5c1ebe04 Add docs to public (#7239)
* New example: public-file-serving

* Updated sitemap-and-robots examples
2019-05-06 15:42:54 +02:00
Lucas Machado
abae1734d8 Add a dot to a note in README.md (#7053) 2019-04-16 15:24:13 -05:00
Tim Neutkens
5054e943d4
Remove experimental flag (#7048) 2019-04-16 22:39:34 +09:00
JJ Kasper
016c197b7f Add AMP docs to README (#7031)
* Add AMP docs to README

* Update wording

Co-Authored-By: ijjk <jj@jjsweb.site>

* remove extra space

Co-Authored-By: ijjk <jj@jjsweb.site>

* Apply suggestions from code review

Co-Authored-By: ijjk <jj@jjsweb.site>

* Apply suggestions from code review

Co-Authored-By: ijjk <jj@jjsweb.site>
2019-04-15 18:02:59 +09:00
Mayank Jethva
eeabb52bb1
Update README.md (#6749)
- fix runtime configuration example to use `customKey`
- standardize warning callouts to use a block quote and bold "**Warning:**" text. Previously there were different ways a warning was mentioned on the docs page:
  - A warning emoji. The warning emoji didn't render in the actual site.
    <img width="770" alt="Screen Shot 2019-03-21 at 9 22 21 AM" src="https://user-images.githubusercontent.com/1103708/54759302-c655f380-4bbb-11e9-9116-b0fdc2467bc3.png">
  - Italicized "Warning" text. Imo, does not stand out on the page.
    <img width="663" alt="Screen Shot 2019-03-21 at 9 24 43 AM" src="https://user-images.githubusercontent.com/1103708/54759376-f604fb80-4bbb-11e9-85c6-6589b7738dee.png">
2019-04-09 15:36:58 -04:00
Ollie Monk
8c87455617 update docs for env variables (#6889)
I got stuck for a while on not being able to set up a global method due to process.envs not being able to be destructured. Hope to allow others not to spend as much time on it as I did!

https://github.com/zeit/next.js/issues/6888
2019-04-04 14:06:36 +02:00
yi
3e7f836c28 Added example with react-multi-carousel for rendering items on the server-side (#6820)
* Simplified format function in with-redux (#6518)

* Update README.md (#6749)

- fix runtime configuration example to use `customKey`
- standardize warning callouts to use a block quote and bold "**Warning:**" text. Previously there were different ways a warning was mentioned on the docs page:
  - A warning emoji. The warning emoji didn't render in the actual site. 
    <img width="770" alt="Screen Shot 2019-03-21 at 9 22 21 AM" src="https://user-images.githubusercontent.com/1103708/54759302-c655f380-4bbb-11e9-9116-b0fdc2467bc3.png">
  - Italicized "Warning" text. Imo, does not stand out on the page.
    <img width="663" alt="Screen Shot 2019-03-21 at 9 24 43 AM" src="https://user-images.githubusercontent.com/1103708/54759376-f604fb80-4bbb-11e9-85c6-6589b7738dee.png">

* Adde example on how to rendering muiltiple items carousel on server-side with nextjs
2019-04-03 12:58:59 +02:00
Allen
8cd7bd1b94 Fix wrong anchors and add missing link (#6845)
self explanatory
2019-04-01 15:00:11 +02:00
Yeoh Joer
9c2f690c0a Fix typo by replacing compatability with compatibility (#6831) 2019-03-29 09:53:00 +01:00
Luis Fernando Alvarez D
dbd41725ce Removed the X-Powered-By header (#6789)
Related to #6776
2019-03-26 12:32:01 +01:00
Kristian Heruc
82314137d0 Add X-Powered-By info to the docs (#6775) 2019-03-25 11:53:46 +01:00
Kristian Heruc
70a2c78342 Remove empty paragraphs and missing examples (#6677)
Fixes #6639 and incorrect heading IDs.
2019-03-16 14:32:08 +01:00
Ravinder Mahajan
1c31d79c38 Creating one more example which only uses redux and no thunk as middl… (#6636)
Adding one more example which only uses redux and not thunk. This helps a lot for a beginner to understand basic redux first.
2019-03-14 17:40:00 +01:00
JJ Kasper
988047f0cd
Update/webpack docs example (#6609)
* Show example of using webpack in config
2019-03-11 15:10:45 -05:00
JJ Kasper
553fbf75e0 Add note about passing webpack to config (#6606) 2019-03-11 19:32:26 +01:00
HelloRusk
1930d7364d fix unnatural spaces in README (#6572)
should use 2 spaces instead of 4
2019-03-08 16:06:13 +01:00
Roman Ernst
cf0552a395 Fix wrong env key in build time configuration docs (#6561)
Env-Key definition should be constantly either `customEnv` or `customKey` - I went for `customKey`.
2019-03-07 12:51:08 +01:00
Santhosh Sundar
1e8017989d fixed typo in code comment (#6555)
This PR fixes a typo in one of the comments in the "Customizing renderPage" code example.
2019-03-07 11:45:08 +01:00
Ryan Hinchey
5dbbf79abc changing an url to a url in the readme (#6540)
Thanks so much for putting this amazing framework together!

I was reading through the docs and noticed how `an URL` was a little awkward to read.  This is an incredibly small update to the readme to change the wording to `a URL`.
2019-03-06 13:16:34 +01:00
Tim Neutkens
e10096cd0c
Add preload notice (#6532)
Fixes #6517
2019-03-05 14:55:05 +01:00
JJ Kasper
491f9a2c49 Move next-mdx from zeit/next-plugins to zeit/next.js (#6443)
At request of @timneutkens I moved the `next-mdx` plugin from the next-plugins repo into Next.js. Also fixed small typo in README under setup.
2019-03-04 18:02:45 +01:00
Tim Neutkens
a169017c87
Add docs for named exports using dynamic (#6502) 2019-03-01 17:28:29 +01:00
Connor Davis
7dc50f3867
Remove cross-spawn (#6450) 2019-02-26 14:57:32 -06:00
Jesse Hoffman
a971d295ab Remove jsonPageRes Documentation Reference (#6440)
Next.js no longer uses `jsonPageRes`.

This PR removes it from `en-us` and `zh-cn` documentation (formatting picked up some changes on zh-cn readme).

Also updated the Flow type def for `getInitialProps`.

Resolves #6363
2019-02-25 16:49:11 +01:00
Joe Haddad
5ff2deabf7 Add Html tag for custom Document (#6372)
This introduces a new `<Html>` tag for a custom `Document` so that we can correctly toggle the `amp` flag (among other things in the future ... maybe).

This is already "tested" through every other test & the AMP validator -- but let me know if we want explicit tests.
2019-02-20 15:46:29 +01:00
JJ Kasper
bf69357f27 Remove onDemandEntries WebSocket server in favor of EventSource connection (#6354)
After talking with @timneutkens it was decided it'd be more streamlined to replace the onDemandEntries WebSocket with an alternative. Using the EventSource connection gives us these benefits over the WebSocket one:

- less code needed
- no extra server running
- no extra config for onDemandEntries
2019-02-19 21:58:47 +01:00
Timothy
3db5361047 Update readme with ZEIT Now deployment guide link (#6341)
* Update readme with ZEIT Now deployment guide link

* Update links to ZEIT Now deployment guide

* Fix missing word
2019-02-19 17:37:00 +01:00
Joshua Scott
46d870ab8a Fix url in docs (#6323) 2019-02-17 12:57:17 +01:00
Gary Meehan
126eb49867 Fix README links (#6284) 2019-02-13 10:53:04 -05:00
Truong Hoang Dung
10f41f5d47 Fix Docs (#6270)
Add options to customize webpack config section.
2019-02-13 07:08:41 +01:00
Juan Olvera
23c9c0d624 Change anynymous functions to named functions on examples in the README.md file (#6255)
* convert export default anonymous functions into named functions

* change examples to function declaration and split export in classes

* change NextHead name to Head and rename component
2019-02-12 00:04:05 +01:00
Kris Luminar
693ab43663 Fix typo (#6230) 2019-02-10 04:45:33 +01:00
Connor Davis
6f162b94e1 Add Error when using publicRuntimeConfig with target serverless and add buildVars (#6212)
Introduce env to next.config.js for build-time configuration
2019-02-08 14:38:18 +01:00
Guilherme Augusto Henschel
ed2aa607d5 Updated readme with improved info about next/link and next/router (#6197) 2019-02-03 14:34:27 +01:00
Dovydas Navickas
f4f3649de3 Update README.md (#6106)
* Update README.md

I know I'm a moron for not understanding what's written in black on white, but... Maybe this will save someone an hour or two 😄

* Apply proposed changed
2019-01-29 15:50:01 +01:00
Luis Fernando Alvarez D
125aaf8834 Small fix in serverless docs (#6146) 2019-01-27 00:24:11 +01:00
Jason Aslakson
00003193df Additional config options for hot reloader web socket connection (#6083)
* Additional config options for hot reloader web socket connection

* Apply suggestions from code review

Accepting suggested code changes

Co-Authored-By: jaslakson <jason.aslakson@americastestkitchen.com>

* updated README with websocket proxy options

* Fix test / cleanup port setting

* Always set proxy_path
2019-01-19 13:39:09 +01:00
Tejas Kumar
f960091997 Improve Serverless section in a minor way (#6081)
I just added a paragraph and some links to the serverless section.
2019-01-17 19:04:01 +01:00
Jerome Fitzgerald
bfbc23d710 📝️ README: Serverless Bullet Point (#6078)
Adds a Bullet Point under "Production deployment"
 for the Table of Contens / Link Section.

Wanted to add this as a comment in #6070.

Great work as always!
2019-01-17 16:38:37 +01:00
Tim Neutkens
c46cd3c5bf
Add docs for Serverless target (#6070)
I need feedback on if this is clear enough for users.
2019-01-17 16:18:06 +01:00
fabb
6c5152538f added warning to readme about nesting of meta tags inside of <Head> (#6068) 2019-01-16 10:57:37 +01:00