Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update create app docs #10382

Merged
merged 3 commits into from Feb 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 6 additions & 9 deletions packages/create-next-app/templates/default/README.md
Expand Up @@ -28,9 +28,6 @@ After creating an app, it should look something like:
```
.
├── README.md
├── components
│ ├── head.js
│ └── nav.js
├── node_modules
│ ├── [...]
├── package.json
Expand All @@ -54,7 +51,7 @@ Out of the box, we get:
- Server rendering and indexing of `./pages/`
- Static file serving. `./public/` is mapped to `/`

Read more about [Next's Routing](https://github.com/zeit/next.js#routing)
Read more about [Next's Routing](https://nextjs.org/docs/routing/introduction)

## Available Scripts

Expand All @@ -78,7 +75,7 @@ It correctly bundles React in production mode and optimizes the build for the be
Starts the application in production mode.
The application should be compiled with \`next build\` first.

See the section in Next docs about [deployment](https://github.com/zeit/next.js/wiki/Deployment) for more information.
See the section in Next docs about [deployment](https://nextjs.org/docs/deployment) for more information.

## Using CSS

Expand Down Expand Up @@ -107,7 +104,7 @@ export default () => (
)
```

Read more about [Next's CSS features](https://github.com/zeit/next.js#css).
Read more about [Next's CSS features](https://nextjs.org/docs/basic-features/built-in-css-support).

## Adding Components

Expand Down Expand Up @@ -147,15 +144,15 @@ For the initial page load, `getInitialProps` will execute on the server only. `g

_Note: `getInitialProps` can **not** be used in children components. Only in `./pages/`._

Read more about [fetching data and the component lifecycle](https://github.com/zeit/next.js#fetching-data-and-component-lifecycle)
Read more about [fetching data and the component lifecycle](https://nextjs.org/docs/basic-features/data-fetching)

## Syntax Highlighting

To configure the syntax highlighting in your favorite text editor, head to the [relevant Babel documentation page](https://babeljs.io/docs/editors) and follow the instructions. Some of the most popular editors are covered.

## Deploy to Now

[now](https://zeit.co/now) offers a zero-configuration single-command deployment.
[ZEIT Now](https://zeit.co/home?utm_source=create-next-app&utm_medium=referral&utm_campaign=Create%20Next%20App) offers a zero-configuration single-command deployment.

1. Install the `now` command-line tool either via npm `npm install -g now` or Yarn `yarn global add now`.

Expand All @@ -167,7 +164,7 @@ To configure the syntax highlighting in your favorite text editor, head to the [

Paste that URL into your browser when the build is complete, and you will see your deployed app.

You can find more details about [`now` here](https://zeit.co/now).
You can find more details about [`ZEIT Now` here](https://zeit.co/home?utm_source=create-next-app&utm_medium=referral&utm_campaign=Create%20Next%20App).

## Something Missing?

Expand Down
11 changes: 9 additions & 2 deletions packages/create-next-app/templates/default/pages/index.js
Expand Up @@ -36,7 +36,10 @@ const Home = () => (
<p>Discover and deploy boilerplate example Next.js projects.</p>
</a>

<a href="https://zeit.co/new/nextjs" className="card">
<a
href="https://zeit.co/new?utm_source=create-next-app&utm_medium=referral&utm_campaign=Create%20Next%20App"
className="card"
>
<h3>Deploy &rarr;</h3>
<p>
Instantly deploy your Next.js site to a public URL with ZEIT Now.
Expand All @@ -46,7 +49,11 @@ const Home = () => (
</main>

<footer>
<a href="https://zeit.co" target="_blank" rel="noopener noreferrer">
<a
href="https://zeit.co?utm_source=create-next-app&utm_medium=referral&utm_campaign=Create%20Next%20App"
target="_blank"
rel="noopener noreferrer"
>
Powered by <img src="/zeit.svg" alt="ZEIT Logo" />
</a>
</footer>
Expand Down