Skip to content
This repository was archived by the owner on May 10, 2021. It is now read-only.

Commit a5278b0

Browse files
committed
Update README with logo and description
1 parent 6b3b0a0 commit a5278b0

File tree

2 files changed

+35
-40
lines changed

2 files changed

+35
-40
lines changed

README.md

Lines changed: 35 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,19 @@
1-
## 🎉🎉🎉 Netlify has adopted `next-on-netlify` 🎉🎉🎉
1+
![Next.js on Netlify](nextonnetlify.png)
22

3-
Great news for everyone using NextJS on Netlify: Netlify has decided to
4-
officially adopt the `next-on-netlify` npm package and to hire an engineer to
5-
support the development of this package. This will make `next-on-netlify`
6-
even better and ensure that using NextJS with Netlify is as seamless and
7-
feature-complete as possible!
3+
<p align="center">
4+
[![NPM version](https://img.shields.io/npm/v/next-on-netlify)](https://www.npmjs.com/package/next-on-netlify)
5+
[![MIT license](https://img.shields.io/npm/l/next-on-netlify)](https://github.com/netlify/next-on-netlify/blob/master/LICENSE)
6+
[![NPM downloads](https://img.shields.io/npm/dt/next-on-netlify)](https://www.npmjs.com/package/next-on-netlify)
7+
[![Tested with Cypress.io](https://img.shields.io/badge/tested%20with-Cypress-04C38E.svg)](https://www.cypress.io/)
8+
</p>
89

9-
The package will remain completely open source and [@cassidoo](https://github.com/cassidoo), the
10-
Principal Developer Experience Engineer at Netlify, will be joining
11-
`next-on-netlify` as a core maintainer.
1210

13-
---
14-
15-
# README
16-
17-
[![NPM version](https://img.shields.io/npm/v/next-on-netlify)](https://www.npmjs.com/package/next-on-netlify)
18-
[![MIT license](https://img.shields.io/npm/l/next-on-netlify)](https://github.com/netlify/next-on-netlify/blob/master/LICENSE)
19-
[![NPM downloads](https://img.shields.io/npm/dt/next-on-netlify)](https://www.npmjs.com/package/next-on-netlify)
20-
[![Tested with Cypress.io](https://img.shields.io/badge/tested%20with-Cypress-04C38E.svg)](https://www.cypress.io/)
21-
22-
next-on-netlify is a utility for hosting NextJS applications with Server-Side Rendering on Netlify. It wraps your NextJS application in a tiny compatibility layer, so that pages can be server-side rendered with Netlify functions.
11+
`next-on-netlify` is a utility for enabling server-side rendering in Next.js on Netlify. It wraps your application in a tiny compatibility layer, so that pages can use Netlify Functions to be server-side rendered.
2312

2413
- Demo: https://next-on.netlify.com/
2514
- Example repository: https://github.com/FinnWoelm/next-on-netlify-demo
2615

16+
2717
## Table of Contents
2818

2919
- [Installation](#installation)
@@ -38,8 +28,9 @@ next-on-netlify is a utility for hosting NextJS applications with Server-Side Re
3828
- [Caveats](#caveats)
3929
- [Preview Mode](#preview-mode)
4030
- [Fallbacks for Pages with `getStaticPaths`](#fallbacks-for-pages-with-getstaticpaths)
41-
- [Showcase](#showcase)
4231
- [Credits](#credits)
32+
- [Showcase](#showcase)
33+
4334

4435
## Installation
4536

@@ -49,9 +40,9 @@ npm install --save next-on-netlify
4940

5041
## Setup
5142

52-
#### 1. Set NextJS target to serverless
43+
#### 1. Set Next.js target to serverless
5344

54-
We must build our NextJS app as a serverless app. You can read more about serverless NextJS [here](https://nextjs.org/docs/api-reference/next.config.js/build-target#serverless-target).
45+
We must build our Next.js app as a serverless app. You can read more about serverless Next.js [here](https://nextjs.org/docs/api-reference/next.config.js/build-target#serverless-target).
5546

5647
It's super simple. Just create a `next.config.js` file and write the following:
5748

@@ -78,7 +69,7 @@ module.exports = {
7869

7970
#### 2. Add postbuild hook
8071

81-
The next-on-netlify package adds the `next-on-netlify` command. When we run this command, some magic happens to prepare our NextJS app for hosting on Netlify\*.
72+
The next-on-netlify package adds the `next-on-netlify` command. When we run this command, some magic happens to prepare our Next.js app for hosting on Netlify\*.
8273

8374
We want the next-on-netlify command to run after we build our NextJS application. So let's add a postbuild hook to our package.json file:
8475

@@ -98,7 +89,7 @@ We want the next-on-netlify command to run after we build our NextJS application
9889

9990
#### 3. Configure Netlify
10091

101-
We're almost done! We just have to tell Netlify how to build our NextJS app, where the functions folder is located, and which folder to upload to its CDN. We do that with a `netlify.toml` file and the following instructions:
92+
We're almost done! We just have to tell Netlify how to build our Next.js app, where the functions folder is located, and which folder to upload to its CDN. We do that with a `netlify.toml` file and the following instructions:
10293

10394
```toml
10495
[build]
@@ -135,7 +126,7 @@ Then, add the following `[dev]` block to your `netlify.toml`:
135126
functions = "out_functions"
136127
publish = "out_publish"
137128
# We manually set the framework to static, otherwise Netlify automatically
138-
# detects NextJS and redirects do not work.
129+
# detects Next.js and redirects do not work.
139130
# Read more: https://github.com/netlify/cli/blob/master/docs/netlify-dev.md#project-detection
140131
framework = "#static"
141132
```
@@ -154,7 +145,7 @@ Now you're all set.
154145

155146
From now on, whenever you want to preview your application locally, just run:
156147

157-
1. `npm run build`: This will run `next build` to build your NextJS app and `next-on-netlify` to prepare your NextJS app for compatibility with Netlify
148+
1. `npm run build`: This will run `next build` to build your Next.js app and `next-on-netlify` to prepare your Next.js app for compatibility with Netlify
158149
1. `netlify dev`: This will emulate Netlify on your computer and let you preview your app on `http://localhost:8888`.
159150

160151
#### Custom Netlify Redirects
@@ -177,31 +168,22 @@ SSR pages and API endpoints. It is currently not possible to create custom Netli
177168

178169
### Preview Mode
179170

180-
[NextJS Preview Mode](https://nextjs.org/docs/advanced-features/preview-mode) does not work on pages that are pre-rendered (pages with `getStaticProps`). Netlify currently does not support cookie-based redirects, which are needed for supporting preview mode on pre-rendered pages. Preview mode works correctly on any server-side-rendered pages (pages with `getInitialProps` or `getServerSideProps`). See: [Issue #10](https://github.com/netlify/next-on-netlify/issues/10)
171+
[Next.js Preview Mode](https://nextjs.org/docs/advanced-features/preview-mode) does not work on pages that are pre-rendered (pages with `getStaticProps`). Netlify currently does not support cookie-based redirects, which are needed for supporting preview mode on pre-rendered pages. Preview mode works correctly on any server-side-rendered pages (pages with `getInitialProps` or `getServerSideProps`). See: [Issue #10](https://github.com/netlify/next-on-netlify/issues/10)
181172

182173
### Fallbacks for Pages with `getStaticPaths`
183174

184-
[Fallback pages](https://nextjs.org/docs/basic-features/data-fetching#fallback-true) behave differently with `next-on-netlify` than they do with NextJS. On NextJS, when navigating to a path that is not defined in `getStaticPaths`, it first displays the fallback page. NextJS then generates the HTML in the background and caches it for future requests.
175+
[Fallback pages](https://nextjs.org/docs/basic-features/data-fetching#fallback-true) behave differently with `next-on-netlify` than they do with Next.js. On Next.js, when navigating to a path that is not defined in `getStaticPaths`, it first displays the fallback page. Next.js then generates the HTML in the background and caches it for future requests.
185176

186177
With `next-on-netlify`, when navigating to a path that is not defined in `getStaticPaths`, it server-side renders the page and sends it directly to the user. The user never sees the fallback page. The page is not cached for future requests.
187178

188179
For more on this, see: [Issue #7](https://github.com/netlify/next-on-netlify/issues/7#issuecomment-636883539)
189180

190-
## Showcase
191-
192-
The following sites are built with `next-on-netlify`:
193-
194-
![opinionatedreact.com](https://raw.githubusercontent.com/netlify/next-on-netlify/master/assets/showcase-opinionatedreact.png)
195-
[opinionatedreact.com](https://opinionatedreact.com/) ([via Twitter](https://twitter.com/NikkitaFTW/status/1302667952920162309))
196-
197-
![missionbit.org](https://raw.githubusercontent.com/netlify/next-on-netlify/master/assets/showcase-missionbit.png)
198-
[missionbit.org](https://www.missionbit.org/) ([#18](https://github.com/netlify/next-on-netlify/pull/18#issuecomment-643828966))
199-
200-
Are you building something awesome with `next-on-netlify`? 🔥 Let us know and we will feature it here :)
201181

202182
## Credits
203183

204-
📣 Shoutout to [@mottox2](https://github.com/mottox2) (a pioneer of hosting NextJS on Netlify) and [@danielcondemarin](https://github.com/danielcondemarin) (author of serverless-next.js for AWS). The two were big inspirations for this package.
184+
This package is maintained by [Lindsay Levine](https://github.com/lindsaylevine), [Finn Woelm](https://github.com/FinnWoelm), and [Cassidy Williams](https://github.com/cassidoo).
185+
186+
📣 Shoutout to [@mottox2](https://github.com/mottox2) (a pioneer of hosting Next.js on Netlify) and [@danielcondemarin](https://github.com/danielcondemarin) (author of serverless-next.js for AWS). The two were big inspirations for this package.
205187

206188
🙌 Big "thank you" to the following people for their contributions, support, and beta testing:
207189

@@ -214,3 +196,16 @@ Are you building something awesome with `next-on-netlify`? 🔥 Let us know and
214196
- [@etrepum](https://github.com/etrepum)
215197
- [@jonasbuntinx](https://github.com/jonasbuntinx)
216198
- [@joostmeijles](https://github.com/joostmeijles)
199+
200+
201+
## Showcase
202+
203+
The following sites are built with `next-on-netlify`:
204+
205+
![opinionatedreact.com](https://raw.githubusercontent.com/netlify/next-on-netlify/master/assets/showcase-opinionatedreact.png)
206+
[opinionatedreact.com](https://opinionatedreact.com/) ([via Twitter](https://twitter.com/NikkitaFTW/status/1302667952920162309))
207+
208+
![missionbit.org](https://raw.githubusercontent.com/netlify/next-on-netlify/master/assets/showcase-missionbit.png)
209+
[missionbit.org](https://www.missionbit.org/) ([#18](https://github.com/netlify/next-on-netlify/pull/18#issuecomment-643828966))
210+
211+
Are you building something awesome with `next-on-netlify`? 🔥 Let us know and we will feature it here :)

nextonnetlify.png

31 KB
Loading

0 commit comments

Comments
 (0)