Commit graph

412 commits

Author SHA1 Message Date
Jerry Gao
4a136476e7
Fix broken example link in docs for catch all routes (#15295)
Fixes a broken link on https://nextjs.org/docs/routing/dynamic-routes

This path was updated from `pages/docs/[...slug].js` to `pages/docs/[[...slug]].js`, so I've updated the link and moved that example down to the "Optional catch all routes" section.
2020-07-18 19:54:40 +00:00
Mario Beltrán Alarcón
56d62a52fd
docs: include test env in default env vars (#13708)
[Current Environment Variables doc](https://nextjs.org/docs/basic-features/environment-variables#default-environment-variables) mentions `development` and `production` env options but nothing about `test`. Test env is a 3rd valid option, and actually has some implications for `.env.local` from [what I can see in load env configs mechanism](https://github.com/vercel/next.js/blob/canary/packages/next/lib/load-env-config.ts#L68).

This PR aims to include corresponding `test` info for environment variables.
2020-07-17 01:36:12 +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
Luis Alvarez D
55137629a7
Documentation improvements from feedback (#14544)
Co-authored-by: Shu Uesugi <shu@chibicode.com>
Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
2020-07-14 00:15:55 -04:00
JJ Kasper
3a9cb2c5b3
Update docs for basePath custom-routes interop (#15140)
Follow-up to https://github.com/vercel/next.js/pull/15041 this updates the documentation for custom-routes to mention `basePath` handling with them
2020-07-14 01:26:54 +00:00
Tim Neutkens
9b711883cf
Update docs about type checking (#15103)
Related to #14997
2020-07-12 19:44:37 +00:00
Ashik Paul
98dbbcfd9a
Fixed some minor typos (#15080) 2020-07-11 16:57:15 +00:00
Oskar
8cd149c3ff
Update note about CDN in pages documentation (#14982)
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2020-07-09 12:55:04 +02: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
Tim Neutkens
fdc4c1773b
Add custom routes docs (rewrites, redirects, headers) (#14887)
Fixes #14452
2020-07-06 14:01:42 +00:00
Tim Neutkens
6fe1260b5f
Add basePath documentation (#14882)
Fixes #14453
2020-07-06 12:35:51 +00:00
Darsh Patel
e84537f88e
add NextWebVitalsMetric type for reportWebVitals (#14675)
Fixes: #13512
Defined and exported type for `metric`  used in [reportWebVitals](https://nextjs.org/docs/advanced-features/measuring-performance)

```
export function reportWebVitals(metric) {
  if (metric.label === 'custom') {
    console.log(metric) // The metric object ({ id, name, startTime, value, label }) is logged to the console
  }
}
```

One can now do 
```
import { NextWebVitalsMetric } from 'next/app'
export function reportWebVitals(metric: NextWebVitalsMetric ) {
  if (metric.label === 'custom') {
    console.log(metric) // The metric object ({ id, name, startTime, value, label }) is logged to the console
  }
}
```
2020-07-03 03:36:13 +00:00
Joe Haddad
1d0e7a8a9a
Enable Optional Catch-All by Default (#14687)
Closes #14682
2020-06-29 18:50:32 +00:00
Luis Alvarez D
a04fdc8475
Add Environment Variables Example (#14575)
Closes https://github.com/vercel/next.js/issues/14570
Closes https://github.com/vercel/next.js/issues/14576

- The example features everything on the page in our docs while still being quite simple
- Added a link to it in the documentation
- Deprecated the with-now-env example
2020-06-28 11:57:33 +00:00
Luis Alvarez D
0f60377967
Updated exportPathMap docs (#14630)
Closes https://github.com/vercel/next.js/issues/14596
2020-06-27 17:33:49 +00:00
James Bowes
166834e578
Update the passHref link (#14584)
Keeping up with section headers in markdown is fun :)

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2020-06-26 11:08:48 -05:00
Luis Alvarez D
c6dc34e4d7
[Docs] Focus on useRouter (#14515)
[ch4109]

Closes https://github.com/vercel/next.js/issues/14500

Our current docs for `next/router` use examples from both `useRouter` and `import Router from 'next/router'`, with this PR I'm unifying the API into `useRouter` (`withRouter` is still going to be mentioned multiple times as it is the HOC alternative) and no longer mentioning that you can import a global `Router` object from `next/router`, not sure if I should mention it at least once but that didn't seem to be required.

I also did some structural changes to the docs for `next/router`, now every method starts with a description, then the implementation and explanation of the parameters of the method, and then the usage example, because every method uses the same `Usage` title the hash for them would be something like `#usage`, `#usage-1`, `#usage-2`, e.t.c, so I'm not very happy with this but it looks good.

Feedback wanted 🙏
2020-06-25 23:35:28 +00:00
Jan Potoms
2142b76e6b
Normalize trailing slashes (#13333)
Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
Co-authored-by: Tim Neutkens <timneutkens@me.com>
2020-06-23 13:38:49 +02:00
stefanprobst
279ae19c7e
docs: update links to docs site (#14305)
this updates some links to the docs site to their new location
2020-06-18 09:54:07 +00:00
Balázs Orbán
e87b739f33
fix typo in fast refresh documentation (#14296) 2020-06-18 01:11:07 +00:00
Joe Haddad
0426694ce0
Add Fast Refresh Documentation (#14273)
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2020-06-17 14:57:57 -04:00
Bowen
da65f5e409
Update preview-mode.md (#14210)
It is an English grammar fix for the sentence, so that the user can better understand the documentation.
2020-06-17 04:24:35 +00:00
Jesse
d3704a66f8
added graphcms (#14026)
* added graphcms

* Updated readme and environment variables

* Removed gitignore

* Updated tailwind config

* Some fixes in pages

* Updated api endpoints

* lint fix

* Updated readme

* Updated og image

* Updated cms examples to include this one

* Added example to docs

* Added preview demo link

* Updated step

Co-authored-by: Luis Alvarez <luis@vercel.com>
2020-06-15 12:03:34 -05:00
Luis Alvarez D
0b4c32c2aa
[Docs] Update custom server docs (#14147)
[ch3235]
2020-06-13 08:47:13 +00:00
Shu Uesugi
30f30af320
Storyblok CMS Example (#13993)
[ch2842]

- Demo: https://next-blog-storyblok.now.sh/
- Preview Mode: https://next-blog-storyblok.now.sh/api/preview?secret=5nnybHTKlbzkOa6r&slug=draft-post-test
2020-06-10 22:23:28 +00:00
Jason Merino
0defd53564
Small grammar fix. (#14043) 2020-06-10 21:42:17 +00:00
Shu Uesugi
dea4c2cbf4
ButterCMS Example (#13908)
[ch2580]

**Demo:** https://next-blog-buttercms.now.sh/
**Preview Mode:** https://next-blog-buttercms.now.sh/api/preview?secret=CdEAKMRT4tAwzqiD&slug=draft-post-test
2020-06-10 17:13:10 +00:00
Rafael Almeida
a89afc2ec6
Add FAQ section to Built-in CSS Support (#13846)
I added a FAQ section to answer questions I see frequently. Motivation: https://github.com/vercel/next.js/discussions/13625#discussioncomment-23186
2020-06-06 22:40:04 +00:00
Rafael Almeida
813b1e62c5
Add App.getInitialProps example to the TypeScript page (#13785)
I added the commented code with the `AppContext` type to match the example from the [Custom App](https://nextjs.org/docs/advanced-features/custom-app) page. But since this is the TS page I think we could remove these comments and use a clean example, what do you think? 🤔
2020-06-05 18:03:31 +00:00
Shu Uesugi
4e6c326a56
Docs: Fix links to Agility CMS Examples (#13794)
 `cms-agility-cms`
 `cms-agilitycms`

See: https://github.com/vercel/next.js/tree/canary/examples/cms-agilitycms
2020-06-05 09:14:43 +00:00
Jan Potoms
1c8f1b50e3
Add a note about optional catch-all and rootmost route (#13791)
Fixes https://github.com/vercel/next.js/issues/13467
2020-06-05 06:19:01 +00:00
Jazib Sawar
6ce7a0378e
CMS Cosmic Example (#13499)
* Add Cosmic CMS Example

* with native .env support, this file isn't needed anymore

* FIX use path alias

* Add cosmicjs package

* Fix alias import in pages/api/preview

* Added: react-imgix & lazysizes package

* Load lazysizes in layout

* Used imgix image with lazyloading

* Added avatar imgix optimizations

* EDITED: steps to install content, preview

* EDITED: demo link

* EDITED: Install step

* EDITED: preview link steps

* Edited: demo link

* FIXED: object_slug

* Screenshots

* Fixed object_slug link

* Update README.md

* Fix: formatting issue

* Updated readme and renamed .env to env.local

* Sanity checks

* Handle fallback data when expected

* Added link to the example in other examples

* Updated demo deployment

* Added example to docs

* minor lint fix

* Remove manual download step

* use vercel.json

Co-authored-by: Tony Spiro <tspiro@tonyspiro.com>
Co-authored-by: Luis Alvarez <luis@vercel.com>
2020-06-04 15:18:11 -05:00
Joe Haddad
7d9b331775
docs: adjust custom polyfill suggestion (#13766)
The current [with-polyfills](https://github.com/vercel/next.js/blob/canary/examples/with-polyfills/) example is not the suggested way to add polyfills and is known to cause issues with bundling.

The proper way to load polyfills is to include them as the first line in `pages/_app.js`, which I've updated the docs to say.
2020-06-04 16:49:37 +00:00
Timothy
d1c16124b5
Update instances of Now to Vercel where applicable (#13760)
This pull request renames various instances of `now` to `vercel` etc. in order to match content that's being updated on the Vercel platform.
2020-06-04 14:57:17 +00:00
Vincent Voyer
33d44238a9
docs(env variables): small wording change (can => have to) (#13757)
When reading
"In order to expose a variable to the browser you can prefix the variable with NEXT_PUBLIC_. For example:"

I thought that I could maybe use something else than NEXT_PUBLIC_. I guess "have to" or similar would be better here, let me know
2020-06-04 13:22:12 +00:00
Shu Uesugi
c02d86ec52
Docs: Add supported browsers and features (#13741)
[ch1981]

Add the “Supported Browsers and Features” page. The content is taken mostly from the blog posts: [9.4](https://nextjs.org/blog/next-9-4), [9.3](https://nextjs.org/blog/next-9-3), and [9.1.7](https://nextjs.org/blog/next-9-1-7).

- This page is added under “Basic Features” on the sidebar.
- It still links to `with-polyfills` example, but [this example was updated recently](04fbe0b756). I simplified the README.
- Removed the FAQ section on supported browsers.
- On ["Customizing Babel Config"](https://nextjs.org/docs/advanced-features/customizing-babel-config), remove the list of presets which were outdated and instead link to [the preset file](https://github.com/vercel/next.js/blob/canary/packages/next/build/babel/preset.ts) so it’s always up to date.
2020-06-04 10:15:34 +00:00
James Mosier
bb6ae2648d
Added React Strict Mode documentation (#13723)
Added new documentation for React Strict mode under the `next.config.js` doc level.

Closes #13713
2020-06-03 17:22:58 +00:00
Joe Haddad
cfa00c9fcd
chore(docs): use proper Jamstack casing (#13697)
`JAMstack` is now `Jamstack`.
2020-06-03 03:02:41 +00:00
Jefferson Bledsoe
9ff29f710d
Docs: Add postcss-preset-env to the warning when customising the PostCSS configuration (#13695)
The [docs for customising the PostCSS config](https://nextjs.org/docs/advanced-features/customizing-postcss-config) warn the user they will need to manually install any dependencies that Next.JS will implicitly use if the config is not overridden. `postcss-preset-env` is missing from the install command.
2020-06-02 23:29:34 +00:00
Luis Alvarez D
ef22a8b7c5
[Examples] Add missing cms links (#13683)
This was a change that I forgot to push into the Agility CMS example PR, adding it now.
2020-06-02 17:36:12 +00:00
Shu Uesugi
d60fada097
CMS Strapi Example (#12701)
* Strapi Example

* Fix og image URL

* Remove next.config.js

* Apply updates

* Remove API_URL

* Bugfixes

* Finish Strapi README

* Deploy Strapi

* Add strapi examples

* now →  vercel [ch1796]

* Use npx

* Minor readme update

* Prettier fix

Co-authored-by: Luis Alvarez <luis@vercel.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2020-06-01 18:49:43 -05:00
Joe Haddad
f49309a92e
docs([[...rest]]): add experimental banner (#13641)
This feature is still experimental.
2020-06-01 22:51:57 +00:00
Luis Alvarez D
ad24a0c855
[Examples] Add WordPress Blog (#13194)
* Added most of the stuff

* Updated pages

* Removed unrequired deps

* API fixes

* Fixes fixes and updated readme

* Updated og image

* Added demo and links to example

* Updated packages

* update name. bump dependencies

* Renamed .env.example to .env.local.example

* Added node_modules to .gitignore

* use recommended config

* enable absolute import/alias support

* remove jsconfig.json

* allow HTML entities in post titles

* add underline to content links

* add basic ul & ol styles

* add code block styles

* add basic text alignment

* add basic image alignment styles

* adjust pre font-size and figcaption

* indent ul,ol lists to line up with grid

* add basic button styles

* add basic file styles

* add basic blockquote style

* add basic audio styles

* add h4 and enhance blockquote styles

* add basic cover block styles

* add basic verse styles

* add basic two-column block styles

* add tags

* add categories

* Only ignore .vercel

The rest is injected by create-next-app

* now → vercel

* npm init → npx

* Wordsmith

* Wordsmith

* Wordsmith

* Wordsmith

* Improve issue link

* Wordsmith

Co-authored-by: Greg Rickaby <greg@gregrickaby.com>
Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
Co-authored-by: Shu Uesugi <shu@chibicode.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2020-06-01 17:17:20 -05:00
Luis Alvarez D
ee87e5d811
Update links in environment variables documentation (#13621)
- The first links were updated to match the new titles
- Removed the `# .env.local` comment as it's redundant
- Added links to the sections related to data fetching
2020-05-31 23:24:14 +00:00
Tim Neutkens
c384ca3710
Update environment variables documentation (#13618)
Based on feedback from @mcsdevv's team. Solves many of the issues users run into with the current docs.
2020-05-31 21:43:49 +00:00
Pavel Korotenko
ff2a03f30a
Update AMP validation docs (#13525)
Updates docs for AMP validation with usage examples for custom validators added in #9191 and `skipValidation` mode added in #10705
2020-05-29 18:05:51 +00:00
Joe Haddad
f0ff77ed88
Add note about GS(S)P imports (#13475)
As reported here:
https://twitter.com/vvoyer/status/1246913957899763712?s=21
2020-05-28 03:22:15 +00:00
Joe Haddad
b7e17e09e5
Update references to zeit/next.js (#13463) 2020-05-27 17:51:11 -04:00
Manu Schiller
9f1b4f5694
Add type inference for getStaticProps and getServerSideProps (#11842)
This adds `InferredStaticProps` and `InferredServerSideProps` to the typings.

- [x] add types for type inference 
- [x] add explanation to docs
- [ ] tests - are there any?

![inferred-props](https://user-images.githubusercontent.com/56154253/79068041-24bcab00-7cc4-11ea-8397-ed1b95fbeca7.gif)

### What does it do:

As an alternative to declaring your Types manually with:
```typescript
type Props = {
  posts: Post[]
}

export const getStaticProps: GetStaticProps<Props> = () => ({
  posts: await fetchMyPosts(),
})

export const MyComponent(props: Props) =>(
 // ...
);
```

we can now also infer the prop types with
```typescript
export const getStaticProps = () => ({
  // given fetchMyPosts() returns type Post[]
  posts: await fetchMyPosts(),
})

export const MyComponent(props: InferredStaticProps<typeof getStaticProps>) =>(
 // props.posts will be of type Post[]
);

```

### help / review wanted
- [ ] I am no typescript expert. Although the solution works as intended for me, someone with more knowledge could probably improve the types. Any edge cases I missed?
- [ ] are there any tests I should modify/ add?
2020-05-27 19:02:22 +00:00
Jacob D. Castro
983d1da844
[Docs]: minor typo in jsx file extension (#13451)
There was no period before `jsx` in the list of file types for pages. I added the period for consistency.
2020-05-27 17:02:51 +00:00
s
dcf446d83d
Update Static HTML Export documentation (#11814)
Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
2020-05-27 00:58:12 -04:00
Joe Haddad
7bd52b8dee
docs(static-html-export): note getServerSideProps (#13401)
x-ref: #12313
2020-05-26 17:16:04 +00:00
Shu Uesugi
de2363bd91
Update debugging docs (#13270)
* Update debugging docs

* typo

* Update docs/debugging.md

Co-authored-by: Luis Alvarez D. <luis@vercel.com>

* Update docs/debugging.md

Co-authored-by: Luis Alvarez D. <luis@vercel.com>

* Clarify

* Move to advanced features

Co-authored-by: Luis Alvarez D. <luis@vercel.com>
2020-05-23 15:58:33 -05:00
Vincent Voyer
aa51f2fcef
docs(debugging): explain how to debug in Chrome DevTools/VS Code (#10807)
This new documentation page explains how to debug your backend and frontend code in Chrome DevTools/VS Code. This works perfectly with full source map support for both Node.js and React code.

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2020-05-23 14:47:28 +02:00
Ian Sutherland
1a53f4500a
Update custom server docs (#13172) 2020-05-22 19:19:36 +02:00
Joe Haddad
1577ae5ce0
Fix dotenv file loading order (#13161)
This matches the `dotenv` spec:
https://github.com/bkeepers/dotenv#what-other-env-files-can-i-use

---

Closes #13015
2020-05-22 17:13:16 +00:00
Luis Alvarez D
fca88d1cfe
Updated docs (#13205)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2020-05-22 10:36:45 +02:00
Luis Alvarez D
195e3e0ac3
[Docs] Replace hot reloading with fast refresh (#13207)
- Mention React Fast Refresh instead of hot reloading in docs
- Added a mention of our deployment docs in the main documentation page
- replaced `npm init` with `npx`
2020-05-22 02:40:06 +00:00
Zach Waterfield
25021473a5
Update the Automatic Static Optimization docs to explicitly state that Next.js will trigger an update. (#13096) 2020-05-19 18:09:57 +02:00
Tim Neutkens
dde5d3bdfe
Update prefetching explanation to correctly reflect data prefetching (#13088) 2020-05-19 07:03:42 -04:00
Joe Haddad
86160a5190
Upgrade to Prettier 2 (#13061) 2020-05-18 15:24:37 -04:00
Stig Kleppe-Jørgensen
97a61a18b2
x-powered-by is added to response, not request (#13037) 2020-05-18 12:58:29 -04:00
Jan Potoms
f8125c9ed7
[Experimental] Implement optional catch all routes (#12887) 2020-05-18 09:47:13 -04:00
Luis Alvarez D
c239c74629
Use a top level heading (#12960) 2020-05-16 15:04:18 +02:00
Tim Neutkens
313b552026
Enable .env support by default (#12911)
* Enable .env support by default

Given we've had tons of reports from various people that expected .env support to work even though they had dotenv installed already I think it's fine to enable it as a default:

Fixes #12728

* Remove old test

* Fix duplicate env loading

* Update docs

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2020-05-15 14:02:16 -05:00
Joe Haddad
9c79955047
Strip out dead code for ignoreDevErrors (#12941) 2020-05-15 13:30:01 -04:00
Nicholas Chiang
c21278999c
Update module-path-aliases.md (#12900) 2020-05-15 11:54:27 +02:00
Brian Gershon
5da1dcf669
Warn users about migrating to 9.4 from dotenv (#12859) 2020-05-14 12:09:33 -04:00
Rafael Almeida
634e621a6e
Fix typo in Environment Variables doc page (#12770) 2020-05-12 13:50:04 +02:00
Jamie Kyle
c88bc17830
Use an if statement instead of expression statement (#12747) 2020-05-11 23:51:26 -04:00
0xflotus
2a62e51a10
(docs): fixed typo error (#12746) 2020-05-11 17:08:31 -04:00
Sergio Xalambrí
e91c0fccbb
Add missing parenthesis in Sending results to analytics example (#12733) 2020-05-11 15:47:56 -04:00
Houssein Djirdeh
ec38b0f0bd
Minor update to "Measuring performance" docs (#12741) 2020-05-11 15:39:21 -04:00
Sébastien Vanvelthem
653098d397
Use @/ to show module alias instead of @ prefixed (#12600)
* docs: controversial '@' prefix aliases should not be used

* Update docs/advanced-features/module-path-aliases.md

Co-authored-by: Joe Haddad <timer150@gmail.com>

* Update docs/advanced-features/module-path-aliases.md

Co-authored-by: Joe Haddad <timer150@gmail.com>

Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-05-11 13:52:59 +02:00
Luis Alvarez D
0b36211a1f
[Docs] Environment Variables (#12696) 2020-05-11 02:18:34 -04:00
Tim Neutkens
467b2c7ebc
Enable sassOptions support in next.config.js (#12685) 2020-05-10 22:11:48 -04:00
Tim Neutkens
e3aeb2f768
Update code sample in performance measurement docs (#12690) 2020-05-10 21:39:18 -04:00
Tim Neutkens
fcbffa3683
Update documentation that refers to isomorphic fetch libs (#12686) 2020-05-10 14:16:03 -04:00
JJ Kasper
92edfb953d
Cont. Update performance relayer and remove unstable prefix (#12665)
* updates relayer, uses web-vital lib, removes fid polyfill and removes unstable prefix from relayer

* simplify logic, fix null check

* update docs

* Update tests

* Rename relayWebVitals to reportWebVitals

Co-authored-by: housseindjirdeh <houssein@google.com>
2020-05-09 21:48:52 +02:00
Shu Uesugi
cc139b8d89
More renaming ZEIT → Vercel (#12649) 2020-05-09 17:21:53 +02: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
Lachlan Campbell
0ef60f11b2
Mention nesting in arrays alongside Fragments in next/head docs (#12420)
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
2020-05-06 11:34:23 +02:00
Tim Neutkens
94651a85eb
Add documentation for TypeScript baseUrl and paths option (#12379)
* Add documentation for TypeScript baseUrl and paths option

* Update module-path-aliases.md

* Update manifest.json
2020-05-06 10:56:06 +02:00
Austin Humes
ab78111781
Update dynamic-import.md (#12541) 2020-05-05 23:36:41 -04:00
Luis Alvarez D
e5bcfdc571
[Docs] Move example links (#12326) 2020-05-02 01:01:07 -04:00
Luis Alvarez D
1f324c7206
[Docs] Add documentation for Router.prefetch (#12333) 2020-05-02 00:42:22 -04:00
Shu Uesugi
b230627614
Minor docs edits for router API (#12404) 2020-05-02 00:20:09 -04:00
Luis Alvarez D
960c18da53
Add docs for Router.back and Router.reload (#12396) 2020-05-02 00:11:06 -04:00
Luis Alvarez D
82596124c6
Add cors example and update API routes docs (#12390) 2020-05-02 00:06:23 -04:00
Luis Alvarez D
8f3931a0be
Add docs for next dev and next start (#12392) 2020-05-02 00:05:26 -04:00
Luis Alvarez D
5ca1b5c5de
[Docs] Add link to relative title in postcss docs (#12330) 2020-04-30 09:51:56 +02:00
James O'Halloran
b0d7881ca7
Update preview-mode.md (#12287) 2020-04-28 15:01:14 -04:00
Andrew Fiedler
5936cbbb69
Update built-in-css-support.md (#12268) 2020-04-28 10:49:51 +02:00
Shu Uesugi
46f1968118
Link to CLI doc from getting started doc / link to Telemetry doc from CLI doc (#12181) 2020-04-24 14:29:26 -07:00
Giovanni Giordano
99eedc4b86
Add quotes to static paths in fallback section (#12170) 2020-04-24 15:33:45 +02:00
Tim Neutkens
483bd3ddda
Rename ZEIT to Vercel (#12075)
* Find/replace

* Update more URLs

* More rename

* Fix remaining examples

* More updates

* Update create-next-app

* Update remaining text

* Update

Co-authored-by: Shu Uesugi <shu@chibicode.com>
2020-04-21 11:47:12 +02:00
Tim Neutkens
6188c79b22 Fix linting 2020-04-20 12:44:52 +02:00
Yangshun Tay
099471eaec
Fix typo in next/amp docs (#12040) 2020-04-20 11:18:38 +02:00
Lee Robinson
16ee0fe2dc
Add note about polyfilling CSS Grid for IE11. (#12035) 2020-04-20 11:17:45 +02:00
Lee Robinson
b52d7ff323
Add documentation on next build output. (#12034) 2020-04-20 11:17:12 +02:00
Lee Robinson
912f746749
Update next/head docs to clarify duplicate tags. (#12033) 2020-04-20 11:15:53 +02:00
Vitor Capretz
26df01800d
docs: improve wording on some pages according to alex.js (#11973) 2020-04-17 16:26:25 +02:00
Paul Matthew Jaworski
22e3c699f6
add warning about manually installing PostCSS plugins (#11966) 2020-04-17 10:27:40 +02:00
Luis Alvarez D
3036463080
Updated shallow docs (#11925) 2020-04-15 15:38:46 -04:00
Gonzalo D'Elia
6202a7f3bd
Fix: Update shallow routing docs (#11894) 2020-04-15 02:21:06 -04:00
Vincent Voyer
7d2ee3b015
docs(Link): precise how prefetch works (#11792)
* docs(Link): precise how prefetch works

After this discussion: https://twitter.com/timneutkens/status/1243572726998188036

This might not be the exact good wording though. Let me know!

* Update docs/api-reference/next/link.md

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

Co-authored-by: Luis Alvarez D. <luis@zeit.co>
2020-04-15 02:03:15 -04:00
Luis Alvarez D
2b1f959b7d
Update shallow routing docs (#11616)
* Updated shallow routing docs

* Include getStaticProps
2020-04-13 20:22:07 -05:00
Joe Haddad
39c068e1f0
Update Serverless Note in Docs (#11861) 2020-04-13 17:11:14 -04:00
Minh Nguyen
ec76d9265c
Rename functional component -> function component (#11850)
See the following for context:

- https://reactjs.org/docs/components-and-props.html#function-and-class-components
- https://overreacted.io/how-are-function-components-different-from-classes/
- https://twitter.com/dan_abramov/status/1057625147216220162
- https://twitter.com/kentcdodds/status/1136274289965928448
2020-04-13 11:33:06 +02:00
Tim Neutkens
c59d24055d
Add Prismic Example (#10897)
* Add Prismic Example

* Update package.json

* Update constants

* Remove react-datocms

* Add Preview Mode for Prismic

* Add support for Preview Mode

* Delete author.jpg

* Delete image.jpg

* Fixes and readme updates

* Fixed issues with preview mode

* Updated preview mode steps

* Added more posts

* Updated readme

* Updated readme

* Added demo URL

* Added related examples links

* Added example to docs

Co-authored-by: Shu Uesugi <shu@chibicode.com>
Co-authored-by: Luis Alvarez <luis@zeit.co>
2020-04-10 12:41:09 +02:00
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: 8c899ee5e4/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
Luis Alvarez D
57d5f83642
Updated links (#10604) 2020-02-19 22:30:47 +01:00
Tim Neutkens
b5c70e8639
Revert "Re-add Sass Docs (#10364)" (#10577)
This reverts commit 72823f04e7.
2020-02-18 19:36:48 +01:00
Joe Haddad
72823f04e7
Re-add Sass Docs (#10364)
* Re-add Sass Docs

* Update built-in-css-support.md

* Apply lint-fix

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2020-02-18 12:22:51 -05:00
Sebastian Benz
ae9b13e0be
Migrate to AMP Optimizer 2.0 (#10535)
* Migrate to AMP Optimizer 2.0

Most notable changes:

* Automatically import all missing AMP component scripts.
* Automatically add any missing mandatary AMP tags.
* 40% faster

I've updated the docs to mention component auto import and added a corresponding
test case.

* change validator tests which now pass validation

* Improve wording

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

* Update adding-amp-components.md

Co-authored-by: JJ Kasper <jj@jjsweb.site>
Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-02-14 16:01:43 -05:00
Shu Uesugi
e871e86b17
Update wording for custom server (#10512)
* Update wording for custom server

* Revise

Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-02-12 22:01:11 -05: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
Mark
04d5bbcc50
Fix typo in ignoring-typescript-errors.md (#10499) 2020-02-11 20:57:26 -05:00
Shu Uesugi
9a9c0d2c4f
Update deploy doc to surface ZEIT Now / DPS (#10412)
* Update deploy docs to surface ZEIT Now / DPS

* Undo removal of deployment section from static export

* Update description slightly

* Wordsmith

* Wordsmith

* Capitalize Serverless Functions

* Wordsmith

* Update docs/deployment.md

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

* Update docs/deployment.md

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

* Update deployment.md

* Update deployment.md

* Update docs/deployment.md

Co-Authored-By: Leo Lamprecht <mindrun@icloud.com>

* Update docs/deployment.md

Co-Authored-By: Leo Lamprecht <mindrun@icloud.com>

* Update docs/deployment.md

Co-Authored-By: Leo Lamprecht <mindrun@icloud.com>

* Update docs/deployment.md

Co-Authored-By: Leo Lamprecht <mindrun@icloud.com>

* Update "develop" section

* Wordsmith

Co-authored-by: Luis Alvarez D. <luis@zeit.co>
Co-authored-by: Leo Lamprecht <mindrun@icloud.com>
2020-02-11 19:25:54 -05:00
Shu Uesugi
9bbf31cae3
TypeScript documentation for _app.tsx (#10345)
* TypeScript documentation for _app.tsx

* Use relative URL

* Use relative URL

* Update docs/basic-features/typescript.md

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

* Update docs/basic-features/typescript.md

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

Co-authored-by: Luis Alvarez D. <luis@zeit.co>
2020-01-30 16:29:14 -05:00
Luis Alvarez D
90015e3509
Update note about public and pages overlap (#10287)
* Updated note about public and pages overlap

* Update static-file-serving.md

* Update static-file-serving.md

Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-01-30 01:13:55 -05:00
Shu Uesugi
3cb7b443b0
Small grammar fix (#10317) 2020-01-28 19:56:55 -08:00
Luis Alvarez D
ee9ccc84cc Updated PostCSS docs and added a link to it (#10292)
* Updated PostCSS docs and added a link to it

* Added note back

* Update customizing-postcss-config.md

Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-01-28 11:02:00 -05:00
Luis Alvarez D
57f72eac9e Add catch all routes example and a link to it in docs (#10202)
* Added example

* Updated readme of the dynamic-routing example

* Updated catch all docs

* Simplified example

* Update examples/catch-all-routes/README.md

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

Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-01-27 13:29:05 -05:00
Shu Uesugi
e1083f0e3a docs: remove --save from npm install; avoid system-ui (#10252)
* Minor edits for CSS doc

* Remove unnecessary --save from npm install

* Different font family

Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-01-27 08:35:12 -05:00
Bart Deslagmulder
7e6e25de7c Add .jsx as a valid file extension in the pages directory (#10281)
It's possible to use a .jsx file extension in the `pages` directory but the doc doesn't mention it.
Next to the current extensions: .js, .ts & .tsx I would mention .jsx also in the list.
2020-01-27 12:52:49 +01:00
Danny Tatom
dd3bb73d80 Update typo in typescript docs (#10276) 2020-01-27 12:51:34 +01:00
Tim Neutkens
c71694e28b
Update built-in-css-support.md 2020-01-26 16:01:22 +01:00
Nikita Borisowsky
5bcd33fccb Fix missing file extensions in docs (#10251) 2020-01-23 22:41:48 -05:00
none23
bc139c29b7 Fix a typo in docs (#10239)
SSR Catching -> SSR Caching
2020-01-23 14:40:09 -05:00
Joe Haddad
fb47360f8d
Add PostCSS Configuration to Sidebar 2020-01-23 14:23:10 -05:00
Joe Haddad
f4a5b61244
Customizing PostCSS Configuration (#10236)
* Customizing PostCSS Configuration

* Adjust docs

* Make a warning

* expand

* Add note about require()

* Have details open by default
2020-01-23 11:47:31 -05:00
Shu Uesugi
85571af157 Improve Link documentation (#10225)
* Improve Link documentation

* Add comments
2020-01-23 11:05:24 +01:00
Alexander Dreith
8449ebc221 [Experimental] Add built-in Sass support (#10133)
* Add built-in Sass support

* Add copy of CSS tests for SCSS

* Fix failing tests

* Fix url-loader tests

* Remove css file generated by tests

* Fix nprogress import for css file

* Fix SCSS modules (still 2 tests that need investigating)

* Update documentation for Sass support

* Fix plain CSS import test

* Fix formatting with prettier fix

* Update test output to reflect scss usage

* Revert "Fix plain CSS import test"

This reverts commit 380319d9d0c4bfb19e28c210262ccd82d19f3556.

# Conflicts:
#	test/integration/scss-modules/test/index.test.js

* Update loader structure

* Resolve loaders before passing to compile function

* Remove dead filter  code

* Arrange loaders in order and push to array

* Fix loader order bug

* Fix global Sass loader and make module prepocessor optional

* Adjust Sass Modules Implementation

* Fix typo

* Adjust regexps

* Use regexes

* Simplify global setup

* Adjust comments

* fix regex

* Simplify identifier file

* Update Sass Instructions

* Remove unneeded fixtures

* Adjust global tests

* Remove wrapper

* Update source maps

* Flag scss behavior

* Fix css property value

* Update fixtures with Sass vars

* Turn on Scss support

* fix HMR test

* Fix snapshots

Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-01-22 15:26:51 -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
Luis Alvarez D
7f021546d3 Remove @zeit/next-css from docs (#10168)
* Removed next-css from docs

* Added mention for next-stylus
2020-01-20 15:41:04 +01:00
Orta
0444cb97ba Update static-html-export.md (#10155) 2020-01-18 16:24:29 -05:00
Shu Uesugi
6de65faef4 Add more details to the deployment doc (#10085) 2020-01-14 10:03:28 -05:00
Joe Haddad
4e71121f3c
Add New CSS Documentation (#10072)
* Restructure CSS Doc

* docs for stylesheets and css modules

* Add production note

* add or

* linebreaks

* Revise docs

* Update docs/basic-features/built-in-css-support.md

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

Co-authored-by: Luis Alvarez D. <luis@zeit.co>
2020-01-13 16:32:13 -05:00
Lorenzo de Vargas Candiago
3096a772fb Change example link to be equal to query property (#10052)
The example uses { name: 'ZEIT' } but then say that it will link to `?name=Zeit`.

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2020-01-12 13:21:09 -06: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
Lorenzo de Vargas Candiago
d4675c56b5 change "wil" to "will" (#10050) 2020-01-11 21:53:58 -05:00
Luis Alvarez D
7b83df3209 [Docs] Add missing import in custom App code example (#10047)
* Updated comment

* Removed unexpected word

* Update custom-app.md

* Update custom-app.md

Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-01-11 14:57:13 -05:00
Ahmad Awais ⚡️
a86640b309 docs: Fix Some Syntax Highlighting (#10013)
Fixes #10012
2020-01-09 11:15:04 -05:00
Jeremias Menichelli
e72d8996b2 Fix typo on code comment for pages docs (#10011) 2020-01-09 16:35:54 +01:00
Tim Neutkens
805e4bb20c Update static-file-serving.md 2020-01-09 12:37:53 +01:00
Luis Alvarez D
18d8c90c3f Updated docs for pathname (#9964)
* Updated docs for pathname

* Apply suggestions from Tim

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

* Removed trailing dots

Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
2020-01-08 11:56:17 +01:00
Luis Alvarez D
f8888636ba Removed <br> from docs (#9972) 2020-01-07 20:37:19 +01:00
Jurian
5a7f9fa2f7 typo fix (#9979)
Changed `getinitialProps` on line 77 to `getInitialProps`
2020-01-07 09:57:54 -05:00
Moritz Kneilmann
f44f9e2da7 docs: Fix imports in router API reference (#9977) 2020-01-07 08:57:46 -05:00
Luis Alvarez D
23a04e466c Add docs for catch all routes (#9967)
* Added docs for catch all routes

* Removed `be`

Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-01-06 16:12:05 -05:00
Ilham Wahabi
12a877d8c8 fix getting data in class based example (#9938)
Check me if i'm wrong but don't we also need to `import fetch from 'isomorphic-unfetch'` in class based example?
Currently it's just in function based component.

Also I think we should access `stars` from props at first right?
2020-01-04 12:51:13 +01:00
Cully Larson
3707701cc9 Fix mistakes in the Deployment doc (#9925)
* Fix a few small spelling and grammar mistakes in the Deployment doc

* Update deployment.md

Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-01-03 15:55:49 -05:00
Cully Larson
a3925b5865 Fix mistakes in the Custom Server doc (#9930) 2020-01-03 15:38:57 -05:00
Cully Larson
4a7a28a887 Fixup the Static HTML Export doc (#9928) 2020-01-03 15:37:11 -05:00
Cully Larson
41d4084c04 Add a missing word to the Static Optimization doc (#9926) 2020-01-03 15:36:53 -05: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
2a70b268c8 Remove dynamic assetPrefix from docs (#9912) 2020-01-03 02:08:32 +01:00
Luis Alvarez D
3ece98b31b
Removed the custom configuration page (#9886) 2019-12-30 14:18:26 -05:00
Konstantin Münster
356e5caf0e Fix bug in data-fetching.md's example (#9868)
Add missing `await` keyword in the Static Generation example
2019-12-29 19:52:00 +01: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