Commit Graph

3801 Commits

Author SHA1 Message Date
Ben 44a04acd72 Update typescript.md (#11717)
just add file name to avoid wrong file name like `_app.ts`
2020-04-07 11:48:18 +02:00
Luis Alvarez D f33ba2c525 [docs] Mention the new data fetching methods on missing places (#11620)
Co-authored-by: Tim Neutkens <timneutkens@me.com>
2020-04-06 13:47:12 +02:00
Vass Bence 969ffd6c1a Mention <title> and styled-jsx caveats in Document's docs (#11499)
* Mention <title> and styled-jsx caveats

* Update custom-document.md

Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
2020-04-06 13:38:29 +02:00
Karl Horky baf0b28779 Add routing example with dynamic as prop (#11114) 2020-04-06 13:36:57 +02:00
Yossi Spektor 23d71ff116 Any elements must be direct children of next/head (#11557)
It is any elements and not only meta or title because the children of next/head are generated in here: https://github.com/zeit/next.js/blob/8c899ee5e4cadc0a1cb47918613c1f6028b26314/packages/next/next-server/lib/head.tsx#L139
where React.cloneElement is called without the third parameter which is needed to clone the children as well (https://reactjs.org/docs/react-api.html#cloneelement).
2020-04-06 13:35:22 +02:00
Luis Alvarez D e3a35b2a3e Update Automatic Static Optimization docs (#11618) 2020-04-06 09:46:19 +02:00
Jaga Santagostino b91ee110b7 add links to sections in data fetching documentation (#11666) 2020-04-05 13:52:43 +02:00
Jan Sepke 2bfbfea635 Update FAQ link (#11636)
to new Data fetching documentation
2020-04-03 19:20:19 +02:00
Luis Alvarez D 9a7f29c981 [Docs] Remove concepts folder (#11621) 2020-04-03 09:45:00 +02:00
JJ Kasper bf96337c6c Update minimum required node version to be more specific (#11604) 2020-04-02 14:06:36 -04: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
kvoncode b48db989bb add: jsx to list of supported files in docs (#11579) 2020-04-02 10:21:13 +02:00
Josh Pullen e4bf0d4c90 Fix small punctuation issue (#11439) 2020-03-30 11:45:11 +02:00
Jeremy Stucki a81d7620a4 docs: Replace micro-cors with cors middleware (#11395) 2020-03-27 13:23:53 +01:00
Luis Alvarez D a391d328ae Add docs for multi zones (#11348)
* Updated example

* Added single now.json

* Added Multi Zones docs

* Fix titles

* Added back the deploy button
2020-03-26 10:44:00 +01:00
Luis Alvarez D 4801dcdd15 Update AMP docs (#11353)
* Add caveat about css support for amp

* Update docs/advanced-features/amp-support/introduction.md

* Update introduction.md

Co-authored-by: Shu Uesugi <shu@chibicode.com>
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
2020-03-26 10:32:36 +01:00
Yuji Matsumoto 67fd72b764 Fix preview-mode docs/examples typo (#11345)
be know => be known
2020-03-25 18:13:33 +01:00
Tim Neutkens 074c60e0ec Update data-fetching.md 2020-03-25 18:08:15 +01:00
Luis Alvarez D 523680c213 [docs] Mention our channels (#11336)
* Mention our communication channels

* Apply suggestions from Shu

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

* Update getting-started.md

Co-authored-by: Shu Uesugi <shu@chibicode.com>
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
2020-03-25 10:06:58 -05:00
Mihira Jayasekera 16a97c87e7 docs: clarify how to customize next/babel presets (#11316)
* docs: clarify how to customize next/babel presets

The current language confused me, because it says the presets/plugins should not be added to .babelrc, but then they are "added" (in a sense) to .babelrc in the subsequent example. Clarify that they shouldn't be added _as their own presets/plugins_.

* docs: further clarify custom next/babel config

Even more explicit.
2020-03-24 10:00:41 +01:00
Luis Alvarez D 1690a756e2 Update GIP docs (#11303)
* Updated docs

* bump

Co-authored-by: JJ Kasper <jj@jjsweb.site>
Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
2020-03-23 18:02:41 -05:00
Tim Neutkens b9320a8f70 Update wording of new data fetching methods recommendation (#11221) 2020-03-20 12:57:17 +01:00
Shu Uesugi a63ac3e715 CMS TakeShape Example (#11038)
* TakeShape Example

* Fix preview logic

* Update README

* Fix broken link

* Be more clear with the relationship field

* Use latest next.js for cms examples

* Only show enabled items

* Ignore current slug

* Fix queries

* Add takeshape demo

* Added link to blog-starter

Co-authored-by: Luis Alvarez D <luis@zeit.co>
2020-03-19 17:30:37 -05:00
Vincent Voyer f0c6df42fb docs(ssr): req is an IncomingMessage instance, not HttpRequest (#11194) 2020-03-19 11:36:09 +01:00
JJ Kasper 756b365adf Add CMS example for Sanity (#10907)
* Add start of Sanity CMS example

* Update cover-image

* Clean up example

* Apply suggestions from code review

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

* Make changes from review

* Remove extra style

* Apply suggestions from code review

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

* Make tweaks for preview mode and normalize env naming

* Update viewing preview step

* Delete author.jpg

* Delete image.jpg

* Update README

* Fix environment variable names

* Project ID is needed by lambda

* Improved steps

* Fixed issue with the project URL example

* Clarify line

* Get the preview post correctly

* preview = false

* Get unique posts

* Show preview mode on index page

* typo fix and use next latest

* Added related examples section

Co-authored-by: Shu Uesugi <shu@chibicode.com>
Co-authored-by: Luis Alvarez <luis@zeit.co>
2020-03-18 18:39:37 -05:00
Tim Neutkens 66e1fa154c Add section on reading files (#11084) 2020-03-18 17:19:38 +01:00
Tim Neutkens 88a6bb36ba Update blog-starter example (#11071)
* Update blog-starter example

* Updated content

* Updated readme

* Updated readme

* static → assets

* Add bottom margin

* Add to docs

* Add excerpt

* Update docs/advanced-features/preview-mode.md

Co-authored-by: Luis Alvarez <luis@zeit.co>
Co-authored-by: Shu Uesugi <shu@chibicode.com>
2020-03-18 09:43:09 +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
Tim Neutkens a231315bf4 Fix prettier linting 2020-03-16 10:20:26 +01:00
Paul Hale d8d3337c4a Update introduction.md (#11092)
* Update introduction.md

AMP is no longer an acronym for "Accelerated Mobile Pages"

* Update docs/advanced-features/amp-support/introduction.md

Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
2020-03-16 09:26:22 +01:00
Yu Watanabe 1edc1a9481 fix paths.params.type in getStaticPaths(document) (#10959) 2020-03-11 12:20:59 +01:00
5alidz f1cb4ea867 Remove extra closing parenthesis (#10948)
* fix missing open parenthesis

* Apply suggestions from code review

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

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2020-03-10 16:16:54 -05:00
Shu Uesugi dffde48472 Add missing words in docs (#10941)
* Add missing words

* Update docs/basic-features/data-fetching.md

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

Co-authored-by: JJ Kasper <jj@jjsweb.site>
Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
2020-03-10 14:33:31 -04:00
Shu Uesugi 745494a9a3 Add demo URL for the DatoCMS example (#10901) 2020-03-09 17:47:21 +01:00
Shu Uesugi bf0ea49b02 DatoCMS Example (#10891)
* Copy cms-datocms

* Update package.json

* Desktop design

* Tablet support

* Mobile styles

* Update titles

* Add article page

* Minor tweaks

* Fix height issue

* Improve text colors

* Extract Alert and Footer components

* Extract avatar

* Add Date

* Extract container

* Fix capitalization

* Make it work with no backend

* Add paragraph styles

* Extract PostPreview

* Extract h2

* Extract more stories

* Refactor into more components

* Update tags

* Add missing key

* Add custom document for lang="" support

* Add dotenv

* Load data for the index page

* Limit posts

* Show post page

* Add markdown processing

* Forgot margin

* Add links

* Remove files and add fallback

* Add og:image

* Add favicon

* Add aria-label

* Fix prerender

* Learn more → read documentation

* Fix links and footer

* Desaturate using imgix

* Add preview secret

* Add preview support

* Fix preview code

* Exit preview mode

* Extract getAllPostsWithSlug

* Extract getAllPostsForHome

* Extract getPreviewPostBySlug

* Extract getPostAndMorePosts

* Extract constants

* Extract markdownToHtml

* Fix markdown styles

* Fix imgix for author

* Add README

* Add links to docs
2020-03-09 11:51:08 +01:00
Tim Neutkens 83b4fd1509 Fix linting of markdown documentation 2020-03-09 10:54:22 +01:00
Balázs Orbán 213a4b8067 Fix getStaticPaths example code (#10893)
* Fix getStaticPaths example code

* Update docs/basic-features/data-fetching.md

Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
2020-03-09 10:24:15 +01:00
Shu Uesugi 2abbb7ab3f Typo on preview mode documentation (#10892) 2020-03-08 18:58:11 -05:00
Shu Uesugi b13892e007 Add TypeScript docs for SSG (#10865)
* Add TypeScript docs

* Fix types
2020-03-06 12:12:46 +01:00
Shu Uesugi 0ff0973edb Preview mode documentation (#10863)
* Add preview mode file

* Update descriptions for data fetching

* Add preview mode documentation

* Use quotes for front matter

* Wordsmith

* Fix URL

* Minor updates

Co-authored-by: Tim Neutkens <timneutkens@me.com>
2020-03-06 12:06:52 +01:00
Joe Haddad 48084649db Re-add Sass Docs (#10850)
This reverts commit b5c70e8639.
2020-03-05 10:56:50 -05:00
Tim Neutkens a61dfb22a1 Fix data fetching learn more links 2020-03-05 16:49:33 +01:00
Tim Neutkens 917ef12248 Update Pages and Data Fetching docs for SSG improvements (#10837)
* Update pages doc for SSG

* Add data fetching doc

* Format code

* Link directly to nextjs.org

* Fix link

* Add .md

* Add .md

* Fix hashes

* Update pages.md

* Wordsmith

* Fix link

* Fix heading

* Capitalization

* Link to pages

* Add router link

* Fix parens

* Make links consistent

* Use commas

* Link to fallback pages

* Update data-fetching.md

* Fix linting

Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
2020-03-05 15:46:44 +01:00
Tim Neutkens a4eef95056 Add docs for static 404 and pages/404 (#10811)
* Add docs for static 404 and pages/404

* Remove new from docs

* Apply suggestions from code review

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

* Rework using suggestions from review

* Apply suggestions from code review

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

* Update custom-error-page.md

* Update custom-error-page.md

* Update custom-error-page.md

* Fix prettier

Co-authored-by: Shu Uesugi <shu@chibicode.com>
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
2020-03-04 19:44:32 +01:00
Vincent Voyer 81c126ee8b fix(cli): inspect flag is deprecated (#10819)
This commit effectively removes the --inspect flag from the CLI help and better inform on the deprecation.
2020-03-04 11:53:20 +01:00
Ethan Ryan 241be2d5c1 updating links to dynamic-routes section of docs (#10759) 2020-03-01 15:23:03 +01:00
Shu Uesugi 709aac1e96 Move upgrading guide to /docs (#10727)
* Move UPGRADING.md to docs

* Add upgrading guide to manifest.json

* Update title

* Move to docs/upgrading

* Update UPGRADING.md

* Update docs/manifest.json

* Update UPGRADING.md

Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
2020-02-28 23:46:18 +01:00
JJ Kasper 2789e7e0c2 Rename getServerProps to getServerSideProps (#10722) 2020-02-27 11:04:30 -06:00
Shu Uesugi c57cdbb31d Rename zeit.co/new → zeit.co/import (#10674)
* Replace zeit.co/new → zeit.co/import

* Update deployment.md
2020-02-24 19:08:34 -05:00