Commit graph

1709 commits

Author SHA1 Message Date
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
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
WeichienHung
c97e53efe1
basePath should also append in urlPrefix (#16376)
Fix https://github.com/vercel/next.js/issues/16197

See my screenshot. Testing url is changed to http://localhost:3000/test and can find the source map.
<img width="826" alt="圖片" src="https://user-images.githubusercontent.com/1462027/90737991-d74eeb00-e300-11ea-9675-f25aef6a4062.png">
2020-08-24 02:00:43 +00:00
Luis Alvarez D
ec281df70b
Remove experimental example (#16497)
@Timer This example seems to not be needed anymore
2020-08-23 18:33:34 +00:00
Diego Gennaro
85d58298a3
Add example: Unsplash integration (#16142)
* nextjs with unsplash initial commit

* update demo link

* remove isomorphic-unfetch

* remove ssr on collection page

* fix style issues

* fix import/no-anonymous-default-export

* usign fetch instead of request

* remove credits

* improve instructions

* improve instructions

* Updated readme steps and images

* Updated readme

* Updated gitignore

Co-authored-by: Luis Alvarez <luis@vercel.com>
2020-08-22 16:02:49 -05:00
Todor Totev
b0d2a80a18
[Examples] Remove horizontal scroll in CMS examples (#16295) 2020-08-18 11:31:20 -04:00
Vishnu Sankar
17aa4b458e
Added next-sitemap example (#15997)
Co-authored-by: Luis Alvarez <luis@vercel.com>
2020-08-18 00:16:42 -04:00
Kristoffer K
2e6bc8eba4
ci: add pnp test (#16255) 2020-08-17 13:39:57 -04:00
Rafael Almeida
521cc621d8
Update Storybook examples to v6.0 (#16139)
* Update with-storybook example

* Delete with-storybook-typescript example

* Add TypeScript section to the README

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2020-08-15 15:42:17 -05:00
Artem Zakharchenko
746000ea5e
Add MSW usage example (#13731)
* Add MSW usage example

* Updated example

* Added .gitignore

* Added .gitignore in the right place lol

Co-authored-by: Luis Alvarez <luis@vercel.com>
2020-08-14 11:47:54 -05:00
Thorsten Schaeff
bdc465092b
examples: Add with-supabase-auth-realtime-db example. (#16016)
r? @lfades @timothyis  
cc @kiwicopple @awalias

Adding a realtime chat example showing how to implement authentication and realtime data syncing with supabase.io :)
2020-08-13 05:03:09 +00:00
madiknox
604ca6c61d
removed renderToHTML from ssr-caching and custom-server-hapi in examples (#16138)
Fixes #14737
2020-08-13 04:43:46 +00:00
madiknox
d81ace268a
removed renderToHTML definition from with-flow example (#16137)
This is my very first PR, I'm hoping to contribute more. Should I also remove `renderErrorToHTML` and `renderError`?

#14737
2020-08-13 04:21:27 +00:00
khasty720
c154a878b6
Add with-reactstrap example (#15474)
## Summary
This PR adds a Next.js example using [Reactsrap](https://reactstrap.github.io/)
2020-08-12 06:25:47 +00:00
Andrew Nagy
2301331703
Add stripPrefix of webpack://_N_E/ (#15955)
In with-sentry add stripPrefix of `webpack://_N_E/`. This removes the `webpack://_N_E/` prefix from the stack trace which will help Sentry to understand what is "App Only" vs "Full"

I'll fully tested calling errors in browser and the stack traces are still aligned and linked correctly. This just gets rid of the extra data in the front which seems to be the same for everyone and I believe it comes from webpack 5 (?)
2020-08-11 17:49:34 +00:00
anotherjsguy
9e70b3de44
update with-filbert-js (#15968)
- Update dependencies for filbert-js
- Add `@filbert-js/macro` example
2020-08-11 03:21:19 +00:00
Francis Rodrigues
4c3d3b7122
Fix: with-firebase-authentication event listener (#16057)
Reference to discussion https://github.com/vercel/next.js/discussions/16010
Bug fixes to `with-firebase-authentication` example that enter in a loop `maximum update depth exceeded errors` becase of the `onIdTokenChanged` Firebase auth method.
I added a clean up event listener.
2020-08-11 01:05:42 +00:00
Dustin Deus
4b2a8253b9
Fix with-i18n-rosetta example (#16023)
* fix

* fix unstable useeffect dep

* FIxed lint issue

Co-authored-by: Luis Alvarez <luis@vercel.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2020-08-10 16:11:11 -05:00
Riccardo Di Maio
394e24073d
Typo fix (built time -> build time) (#16006) 2020-08-08 17:23:25 +00:00
Riccardo Di Maio
bdaedd220a
Remove another broken demo link from with-graphql-faunadb (#16007)
The link used to appear twice in the README, but it has only been removed once (#15267) to fix #15219. This commit removes the other link to the broken demo.
2020-08-08 17:05:29 +00:00
Kazuhito Hokamura
7a9ee4b9e5
Update Sentry example to improve display of server errors (#15495)
In the Sentry example, sourcemaps is not enabled in server error.

I solved this problem by using `RewriteFrames`. On the client side, the sourcemaps path is `~/_next`, but on the server side it needs to be `~/.next` (distDir), so I rewrite it using the `iteratee`.

ref. https://docs.sentry.io/platforms/node/sourcemaps/#updating-sentry-sdk-configuration-to-support-source-maps

-----

## before
<img width="983" alt="ss2" src="https://user-images.githubusercontent.com/39471/88479997-29188580-cf8e-11ea-8d16-10ccfa6fc1a4.png">

## after
<img width="989" alt="ss1" src="https://user-images.githubusercontent.com/39471/88479995-26b62b80-cf8e-11ea-8b1f-7784b32b9e6d.png">
2020-08-07 07:22:08 +00:00
Sven Anderson
db69e4747a
example application on Redis (Lambda.store) (#15532)
This example application guides you to build a next.js application and integrate lambda.store as data store. See readme for details.
2020-08-07 01:34:02 +00:00
Arsalan Khattak
ebd1434a84
Add PWA Example (#15433)
Co-authored-by: Luis Alvarez D. <luis@vercel.com>
2020-08-06 13:14:35 -04:00
Raibima Putra
3922fa0584
with-react-native-web: move meta viewport to _app.js (#15945) 2020-08-06 12:35:03 -04:00
Joe Haddad
817d558a6d
Add missing gitignore 2020-08-06 00:07:15 -04:00
Aubrey
7d8e0c512f
updated active-class-name example to also demo a [slug] path (#15924)
updated example for [active-class-name](f00ad581a1/examples/active-class-name) to also support a `[slug].js` page that matches on `as` instead of `href` (as `href` would be `/[slug]`)

> This does not demo `[..slug].js` as this requires possible custom code for determining the slug path part for the active classname. i.e. page tree active nodes. A possible other example or another PR on this example.

Has possible information for:
 * https://github.com/vercel/next.js/issues/7410
2020-08-06 01:26:48 +00:00
Luis Alvarez D
c11ee1d857
[Examples] Remove horizontal scroll in CMS examples (#15921)
This is the same fix from https://github.com/vercel/next.js/pull/15729 - Adding it in a new PR as I can't update the current one.

Closes #15729
Fixes #15676
2020-08-05 22:39:44 +00:00
Robin Tom
5218e76818
Example for Redirects (Custom routes) (#15411)
This PR adds example for #15073 
> - [ ] `redirects` For [docs/api-reference/next.config.js/redirects.md](https://github.com/vercel/next.js/blob/canary/docs/api-reference/next.config.js/redirects.md)
2020-08-05 22:20:49 +00:00
Mikkel Laursen
9ef0fae889
[Examples] Update react-md examples for v2 (#15723) 2020-08-05 14:24:20 -04:00
Jack Clackett
026785d5ad
Update with-apollo examples to merge existing cache (#15804) 2020-08-05 11:30:29 -04:00
Aleksander
8703f134de
Fix awaiting for sync method of remark in cms examples (#15555) 2020-08-05 11:30:04 -04:00
nirtamir2
5be6f25cd7
examples/custom-server-typescript upgrade dependencies (#15833) 2020-08-05 15:15:38 +02:00
Riccardo Di Maio
229817d50d
Fix typos in blog-starter and blog-starter-typescript (#15807)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2020-08-05 15:15:27 +02:00
Darsh Patel
885b40681c
remove dotenv from with-stripe-typescript (#15814)
removed the dotenv dependency in favor of Next.js environment support: #15225

The example seems to work with no other changes required
![Screenshot 2020-08-03 at 12 03 22 PM](https://user-images.githubusercontent.com/11258286/89152753-557d6480-d581-11ea-919c-4b89a6bec4b6.png)
2020-08-05 10:49:46 +00:00
Joseph Knowles
432a1dec6a
Fix with-firebase-authentication example: Update the cookie when ID token refreshes on client (#15628)
I noticed a problem with the example - when you leave it logged in for more than an hour it breaks. The example API call starts to fail with `auth/id-token-expired`.

Looking at the code I saw that we never update the id token after signing in, but firebase automatically updates it every hour, meaning our `verifyIdToken` fails after an hour. 

So I used the `onIdTokenChanged` function from firebase to update the cookie every time the id token changes.

I'm open to suggestions on refactoring the code I've added.
2020-08-05 08:38:26 +00:00
Amith Mihiranga
669cad9731
Fix: with-mongodb-mongoose example improper fetch error handling (#15856)
Correct the error handling for fetch API to check if the status is ok or not

FIxes #15808
2020-08-05 07:37:29 +00:00
Flavian Desverne
f9cb5ac6b0
Replace Graphcool with dedicated example GraphQL server using Prisma (#15752)
## Motivation

As Graphcool is being shutdown, we replaced all the graphcool api endpoints with some handcrafted APIs using Prisma & Nexus, that can be found here https://github.com/prisma-labs/nextjs-graphql-api-examples. These GraphQL endpoints are now deployed to Vercel.

## Notes

- I couldn't get the reason-relay example to run. Given that the relay endpoint works on the other relay example, I don't see any reason why it wouldn't work on that one
- The `with-apollo` example is buggy when creating some posts, but nothing related to the switch of the api endpoint as it was already buggy before. I suspect the `concatPagination` strategy to be the cause of that bug, but I couldn't figure it out.

Fixes #14780
2020-08-05 06:26:54 +00:00
Darsh Patel
5db2860cc8
add payment description for with-stripe-typescript (#15888) 2020-08-05 02:04:20 -04:00
agstover
fcc4d8cd50
await ctx.renderPage() in examples for TypeScript (#15528)
Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
2020-08-04 14:46:40 -04:00
matamatanot
9ca670d1b9
Remove dotenv from with-firebase example (#15743)
Remove the dotenv dependency from all examples (in favor of environment support): #15225

All variables are exposed to the client. This Example does not use firebase-admin.
2020-08-04 16:26:13 +00:00
Marc
6ffc3f2a15
Updated with-passport example to fix syntax errors (#15831)
I was referencing the with-passport example and found a minor syntax error:\
The login and signup page both used `event.preventDefault()` on the submit handlers, whereby the correct reference to the event is `e` as defined within the `handleSubmit` functions.

Additionally used the chance to bump npm packages, the largest bump being swr to the latest version: 0.3.0

### Summary of all Changes made:
* Fixed syntax error on login page
* Fixed syntax error on signup page
* Bumped cookie to 0.4.1
* Bumped next-connect to 0.8.1
* Bumped swr to 0.3.0
2020-08-03 16:56:57 +00:00
Kim T
ea026151b2
with-electron-typescript build error fix (#15803)
Fixes #15802 

Added Params type to prevent typescript error during build step
2020-08-03 13:17:38 +00:00
sreekumar menon
9f92819742
Remove dotenv from auth0 Next.js example (#15398)
We should remove the dotenv dependency from all Next.js examples (in favor of Next.js environment support):
https://github.com/vercel/next.js/issues/15225
2020-08-02 19:22:39 +00:00
David Lemayian
d0b6026dc5
examples: Update with-electron .gitignore (#15783)
Thank you for the excellent examples.

This PR updates the `.gitignore` for [with-electron](https://github.com/vercel/next.js/tree/canary/examples/with-electron) example to ignore the output folders.
2020-08-02 08:14:48 +00:00
Ronald Stevanus
b3c9737445
Fix gh-pages deploy script (#15724)
## What

The current `gh-pages` example has issue when deploying. 

This is how the error looks like:
![image](https://user-images.githubusercontent.com/1008093/88996697-827f0c80-d320-11ea-93bd-48141c321a65.png)

```
...
Export successful
The following paths are ignored by one of your .gitignore files:
out
hint: Use -f if you really want to add them.
hint: Turn this message off by running
hint: "git config advice.addIgnoredFile false"
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! next@1.0.0 deploy: `rm -rf node_modules/.cache && next build && next export && touch out/.nojekyll && git add out/`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the next@1.0.0 deploy script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
...
```

It's because `out` folder is added on `.gitignore` and the deploy script runs `git add out/`.
The fix is to remove `out` folder from `.gitignore`.

## How was it tested
run `npm run deploy`, it should be completed successfully.
2020-07-31 16:25:17 +00:00
Pierre de la Martinière
0729394ee1
Update next-transpile-modules in all examples (#15739)
Should prevent some tears when people tries to replicate some example with Next.js 9.5.0 ;)

cheers!
2020-07-31 15:53:53 +00:00
Jon Espen Kvisler
1409cd6e3f
Update next-transpile-modules in with-react-intl example (#15730)
next-transpile-modules needs to be updated to support Next.js 9.5

Closes #15725
2020-07-31 07:14:37 +00:00
Luis Alvarez D
73303a71ae
[Examples] Fix with-sentry (#15694) 2020-07-30 11:59:27 -04:00
Stephen Cefali
59924967f1
remove broken server example (#15653)
This removes the server 4 example which breaks all server code since the error will happen when the file is sourced.
2020-07-29 23:58:11 +00: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