-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
[Pages] nextjs deployment guide #12901
Conversation
This PR changes current filenames or deletes current files. Make sure you have redirects set up to cover the following paths:
|
Deploying with Cloudflare Pages
|
0b43eba
to
21b2381
Compare
Co-authored-by: Dario Piotrowicz <dario@cloudflare.com>
pcx_content_type: navigation | ||
title: Deploy a Next.js site | ||
meta: | ||
description: React framework for building full-stack web applications. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description: React framework for building full-stack web applications. | |
description: Next.js is a React framework for building full-stack web applications. |
|
||
## Create a new project using the `create-cloudflare` CLI (C3) | ||
|
||
Open up your terminal and run the following command to create a new Next.js site. Your Next.js site is configured for Cloudflare Pages using the [`create-cloudflare` CLI (C3)](https://github.com/cloudflare/workers-sdk/tree/main/packages/create-cloudflare). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Should we link to Dev Docs instead? URL would be /pages/get-started/c3/
.
$ npx wrangler pages dev .vercel/output/static --compatibility-flag=nodejs_compat | ||
``` | ||
|
||
By doing this, you can run your application locally to make sure everything is working as you expect it to. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Note sure if "this" refers to the last step or the entire procedure.
content/pages/framework-guides/nextjs/deploy-a-static-nextjs-site.md
Outdated
Show resolved
Hide resolved
content/pages/framework-guides/nextjs/deploy-a-static-nextjs-site.md
Outdated
Show resolved
Hide resolved
If you have created your project without C3, run: | ||
|
||
```sh | ||
$ npx @cloudflare/next-on-pages |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: the "official" build command (from the preset) includes the major version (@1
):
$ npx @cloudflare/next-on-pages@1
PCX Co-authored-by: Pedro Sousa <680496+pedrosousa@users.noreply.github.com>
Reinstate the static guide.
Iterate on new fullstack guide.
PCX-9715
closes #12707