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

Commit 573f76c

Browse files
authored
Merge pull request #62 from netlify/cw/updatereadme
Update README with logo and description
2 parents 6b3b0a0 + caf698d commit 573f76c

File tree

2 files changed

+44
-40
lines changed

2 files changed

+44
-40
lines changed

README.md

Lines changed: 44 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,24 @@
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+
<a aria-label="npm version" href="https://www.npmjs.com/package/next-on-netlify">
5+
<img alt="" src="https://img.shields.io/npm/v/next-on-netlify">
6+
</a>
7+
<a aria-label="MIT License" href="https://img.shields.io/npm/l/next-on-netlify">
8+
<img alt="" src="https://img.shields.io/npm/l/next-on-netlify">
9+
</a>
10+
<a aria-label="npm downloads" href="https://www.npmjs.com/package/next-on-netlify">
11+
<img alt="" src="https://img.shields.io/npm/dt/next-on-netlify">
12+
</a>
13+
<a aria-label="Tested with Cypress" href="https://www.cypress.io/">
14+
<img alt="" src="https://img.shields.io/badge/tested%20with-Cypress-04C38E.svg">
15+
</a>
16+
</p>
817

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.
1218

13-
---
19+
`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.
1420

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.
21+
**TL;DR: You can enable SSR in your Next.js applications with 3 simple steps, listed [here](#setup)!**
2322

2423
- Demo: https://next-on.netlify.com/
2524
- Example repository: https://github.com/FinnWoelm/next-on-netlify-demo
@@ -28,7 +27,7 @@ next-on-netlify is a utility for hosting NextJS applications with Server-Side Re
2827

2928
- [Installation](#installation)
3029
- [Setup](#setup)
31-
- [1. Set NextJS target to serverless](#1-set-nextjs--target-to-serverless)
30+
- [1. Set Next.js target to serverless](#1-set-nextjs-target-to-serverless)
3231
- [2. Add postbuild hook](#2-add-postbuild-hook)
3332
- [3. Configure Netlify](#3-configure-netlify)
3433
- [Optional Extras](#optional-extras)
@@ -38,8 +37,9 @@ next-on-netlify is a utility for hosting NextJS applications with Server-Side Re
3837
- [Caveats](#caveats)
3938
- [Preview Mode](#preview-mode)
4039
- [Fallbacks for Pages with `getStaticPaths`](#fallbacks-for-pages-with-getstaticpaths)
41-
- [Showcase](#showcase)
4240
- [Credits](#credits)
41+
- [Showcase](#showcase)
42+
4343

4444
## Installation
4545

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

5050
## Setup
5151

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

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).
54+
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).
5555

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

@@ -78,7 +78,7 @@ module.exports = {
7878

7979
#### 2. Add postbuild hook
8080

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\*.
81+
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\*.
8282

8383
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:
8484

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

9999
#### 3. Configure Netlify
100100

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:
101+
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:
102102

103103
```toml
104104
[build]
@@ -135,7 +135,7 @@ Then, add the following `[dev]` block to your `netlify.toml`:
135135
functions = "out_functions"
136136
publish = "out_publish"
137137
# We manually set the framework to static, otherwise Netlify automatically
138-
# detects NextJS and redirects do not work.
138+
# detects Next.js and redirects do not work.
139139
# Read more: https://github.com/netlify/cli/blob/master/docs/netlify-dev.md#project-detection
140140
framework = "#static"
141141
```
@@ -154,7 +154,7 @@ Now you're all set.
154154

155155
From now on, whenever you want to preview your application locally, just run:
156156

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
157+
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
158158
1. `netlify dev`: This will emulate Netlify on your computer and let you preview your app on `http://localhost:8888`.
159159

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

178178
### Preview Mode
179179

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)
180+
[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)
181181

182182
### Fallbacks for Pages with `getStaticPaths`
183183

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.
184+
[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.
185185

186186
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.
187187

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

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 :)
201190

202191
## Credits
203192

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.
193+
This package is maintained by [Lindsay Levine](https://github.com/lindsaylevine), [Finn Woelm](https://github.com/FinnWoelm), and [Cassidy Williams](https://github.com/cassidoo).
194+
195+
📣 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.
205196

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

@@ -214,3 +205,16 @@ Are you building something awesome with `next-on-netlify`? 🔥 Let us know and
214205
- [@etrepum](https://github.com/etrepum)
215206
- [@jonasbuntinx](https://github.com/jonasbuntinx)
216207
- [@joostmeijles](https://github.com/joostmeijles)
208+
209+
210+
## Showcase
211+
212+
The following sites are built with `next-on-netlify`:
213+
214+
![opinionatedreact.com](https://raw.githubusercontent.com/netlify/next-on-netlify/master/assets/showcase-opinionatedreact.png)
215+
[opinionatedreact.com](https://opinionatedreact.com/) ([via Twitter](https://twitter.com/NikkitaFTW/status/1302667952920162309))
216+
217+
![missionbit.org](https://raw.githubusercontent.com/netlify/next-on-netlify/master/assets/showcase-missionbit.png)
218+
[missionbit.org](https://www.missionbit.org/) ([#18](https://github.com/netlify/next-on-netlify/pull/18#issuecomment-643828966))
219+
220+
Are you building something awesome with `next-on-netlify`? 🔥 Let us know and we will feature it here :)

nextonnetlify.png

70.6 KB
Loading

0 commit comments

Comments
 (0)