Commit graph

115 commits

Author SHA1 Message Date
JJ Kasper
379f4c6574
Expose configured default locale in GS(S)P methods (#18216) 2020-10-27 05:43:15 -04:00
Steven
3a169fbbf0
Separate config into deviceSizes and iconSizes (#18267)
This separates the `next.config.js` property `images.sizes` into to properties: `images.deviceSizes` and `images.iconSizes`.

The purpose is for images that are not intended to take up the majority of the viewport.


Related to #18122
2020-10-26 20:07:52 +00:00
Tim Neutkens
557a0001db
Update image-optimization.md 2020-10-26 18:17:26 +01:00
Tim Neutkens
c381a35247
Update image-optimization.md 2020-10-26 18:13:21 +01:00
Tim Neutkens
8db23295d3
Update image-optimization.md 2020-10-26 18:12:40 +01:00
Tim Neutkens
129fb85da4
Update image-optimization.md 2020-10-26 18:07:23 +01:00
Steven
ce38e4f6fe
FIx image optimization docs (#18254)
Add missing links in the documentation
2020-10-26 12:51:11 -04:00
Steven
3c6f421d99
Add docs for Image Optimization (#18107)
Co-authored-by: Lee Robinson <me@leerob.io>
Co-authored-by: Tim Neutkens <timneutkens@me.com>
2020-10-24 14:53:28 +02:00
JJ Kasper
d4397d8ab5
Add initial i18n documentation (#18067)
* Add initial i18n documentation

* Apply suggestions from code review

Co-authored-by: Tim Neutkens <tim@timneutkens.nl>

* Apply suggestions from code review

Co-authored-by: Lee Robinson <me@leerob.io>

* Apply more suggestions

* rephrase a bit more

* Update doc

Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
Co-authored-by: Lee Robinson <me@leerob.io>
Co-authored-by: Tim Neutkens <timneutkens@me.com>
2020-10-23 10:42:52 -05:00
Luis Alvarez D
e05f3a9112
Capitalize Data Fetching title in docs (#18001)
Noticed that most of our mentions to Data Fetching are capitalized in both words, but the page itself wasn't. And it's not consistent with the titles in other sections
2020-10-19 01:31:40 +00:00
Amir Ali
d73b34c3fd
Fix higherOrderComponent causing broken layout (#17812)
`higherOrderComponent(WrappedComponent)` causing the layout broken in mobile screen. 
* refer to screenshots below.


![image](https://user-images.githubusercontent.com/43801058/95730641-faaa6c80-0c97-11eb-9951-2a47b61cefad.png)
![image](https://user-images.githubusercontent.com/43801058/95730661-0138e400-0c98-11eb-9f02-b4d0676fd21b.png)

if we could make it `HOC(WrappedComponent)` it will not break the layout in mobile screen
![image](https://user-images.githubusercontent.com/43801058/95730673-04cc6b00-0c98-11eb-8782-2fa1f760f8fd.png)
2020-10-13 18:55:21 +00:00
Yann Pringault
75a0ef9cc2
[docs] Fix typo Next.js -> TypeScript (#17561) 2020-10-02 10:27:38 -05:00
Lee Robinson
fa244ef833
Mention favicon.ico in static file serving docs. (#17540) 2020-10-01 21:14:14 +00:00
Luis Alvarez D
816798569a
Mention required version for global CSS imports in node_modules (#17506)
Fixes https://github.com/vercel/next.js/issues/17505
2020-10-01 08:58:22 +00:00
Dan Laugharn
5f16e063a6
Adds note about public directory (#17203)
This comes up a lot in discussions/as an issue, so added a small comment about uploading files to the public directory. I'm not sure if it is worth a deeper technical explanation as well.
2020-09-18 15:02:37 +00:00
JJ Kasper
d3f4a4cb2a
Provide resolvedUrl to getServerSideProps (#17082)
This continues off of https://github.com/vercel/next.js/pull/17081 and provides this normalized `asPath` value in the context provided to `getServerSideProps` to provide the consistent value since the request URL can vary between direct visit and client transition and the alternative requires building the URL each time manually. 

Kept this change separate from https://github.com/vercel/next.js/pull/17081 since this is addressing a separate issue and allows discussion separately. 

Closes: https://github.com/vercel/next.js/issues/16407
2020-09-14 21:01:04 +00:00
Joe Haddad
1ea6745106
Importing CSS from Third Party React Components (#16993) 2020-09-10 13:45:30 -04:00
Turcan Vladimir
b227691942
Fix align documentation with the code (#16843) 2020-09-08 12:29:42 -04:00
Yichi Zhang
9e4bb5a129
Add Fast Refresh Demo (#16576)
Closes #16538 

Basically reverts #16497 and some minor changes. Also adds a link in the docs.

This reverts commit ec281df70b.
2020-09-01 23:27:57 +00:00
Rich Paret
5bda90f87b
Include yarn instructions (#16565)
* Include yarn instructions

Yarn seems like it's encouraged elsewhere (such as in create-next-app docs), so adding this to clarify it's supported here.

* Added to a similar case

Co-authored-by: Luis Alvarez D <luis@vercel.com>
2020-08-27 21:27:34 -05:00
Christian Pena Valerio
fc5f26b556
Fix github docs links (#16540)
Take care of the other links that aren't working while browsing github. Related to: #16505
2020-08-25 04:31:48 +00:00
Ondřej Chrastina
a856097402
Add Kontent example (#16034)
Hello everyone!

I would like to add the example using [Kentico Kontent](https://kontent.ai) as a data source for your example.
I have tried to be consistent with the other examples and showcase the preview as well.

I have tried to keep up with [Contribution guidelines](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples).

Thank you.
2020-08-24 22:58:53 +00:00
Christian Pena Valerio
c9ad33bd59
Update fast-refresh.md to fix 404 link (#16505) 2020-08-24 09:58:13 -05: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
Louis Juliendo
24f056c9b3
Fix typo in fast-refresh.md (#16292)
Just correcting a simple typo `fash` to `fast`
2020-08-18 13:15:39 +00:00
Rounak Agarwal
512782ee29
Update docs for server-side code in GS(S)P props (#16198)
Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
2020-08-18 01:14:26 -04:00
Caleb Fetzer
79bab9771c
DOCS: Typo fixes - data-fetching (#16004)
Few typos, missing spaces, some small cleanup on grammar.
2020-08-08 15:33:34 +00:00
Eric Piacentini
e18f74fe2d
Update Fast Refresh doc (#15923)
Co-authored-by: Luis Alvarez D <luis@vercel.com>
Co-authored-by: Tim Neutkens <timneutkens@me.com>
Co-authored-by: Joe Haddad <timer150@gmail.com>
2020-08-06 12:34:05 -04:00
Joe Haddad
c86466f4ee
Add variable expansion note (#15917)
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2020-08-05 23:39:32 -04:00
Joe Haddad
e0d0c2ebb5
Explain Sass Extensions in CSS Docs (#15830)
Fixes #15737
2020-08-03 23:50:46 -04:00
Luis Alvarez D
925384c1cf
Added docs for Incremental Static Regeneration (#15663) 2020-07-29 22:35:25 -04:00
Luis Alvarez D
63ea2d8297
Add CSS Modules examples to docs (#15601)
Fixes https://github.com/vercel/next.js/issues/15595

- Updated the tailwindcss and tailwindcss-emotion examples to the latest version of tailwindcss
- Added a new `with-styled-jsx` example
- Updated the `basic-css` example to use CSS Modules instead of styled-jsx
- Added the examples to the documentation page for built-in css support
2020-07-29 14:43:48 +00:00
Luis Alvarez D
bf1af6880a
[Docs] Update links that should point to Vercel repos (#15547)
From feedback, we still have some links that go to zeit repos instead of vercel
2020-07-28 04:16:31 +00:00
Tim Neutkens
f98e38c9b6
Add static tweet link (#15493) 2020-07-26 16:51:11 +02: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
Tim Neutkens
9b711883cf
Update docs about type checking (#15103)
Related to #14997
2020-07-12 19:44:37 +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
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
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
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
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