Unverified Commit 36eba952 authored by Manny Becerra's avatar Manny Becerra Committed by GitHub

Fixes #33153: Updating cross-references from master to main + canary (#33198)

* copy cleanup in env. variables docs

* copy cleanup in fast refresh docs

* Supplements #33153 - updating existing cross-references to `master` branch to renamed default branch of `main`

* Supplements #33153 - updating existing cross-references to `master` branch to renamed default branch of `main`
Co-authored-by: 's avatarkodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
parent 0de84472
...@@ -10,14 +10,14 @@ trigger: ...@@ -10,14 +10,14 @@ trigger:
- docs - docs
- errors - errors
- examples - examples
# Do not run Azure on `canary`, `master`, or release tags. This unnecessarily # Do not run Azure on `canary`, `main`, or release tags. This unnecessarily
# increases the backlog, and the change was already tested on the PR. # increases the backlog, and the change was already tested on the PR.
branches: branches:
include: include:
- '*' - '*'
exclude: exclude:
- canary - canary
- master - main
- refs/tags/* - refs/tags/*
pr: pr:
......
...@@ -25,7 +25,7 @@ yarn create next-app --typescript ...@@ -25,7 +25,7 @@ yarn create next-app --typescript
`create-next-app` comes with the following options: `create-next-app` comes with the following options:
- **--ts, --typescript** - Initialize as a TypeScript project. - **--ts, --typescript** - Initialize as a TypeScript project.
- **-e, --example [name]|[github-url]** - An example to bootstrap the app with. You can use an example name from the [Next.js repo](https://github.com/vercel/next.js/tree/master/examples) or a GitHub URL. The URL can use any branch and/or subdirectory. - **-e, --example [name]|[github-url]** - An example to bootstrap the app with. You can use an example name from the [Next.js repo](https://github.com/vercel/next.js/tree/canary/examples) or a GitHub URL. The URL can use any branch and/or subdirectory.
- **--example-path [path-to-example]** - In a rare case, your GitHub URL might contain a branch name with a slash (e.g. bug/fix-1) and the path to the example (e.g. foo/bar). In this case, you must specify the path to the example separately: `--example-path foo/bar` - **--example-path [path-to-example]** - In a rare case, your GitHub URL might contain a branch name with a slash (e.g. bug/fix-1) and the path to the example (e.g. foo/bar). In this case, you must specify the path to the example separately: `--example-path foo/bar`
- **--use-npm** - Explicitly tell the CLI to bootstrap the app using npm. To bootstrap using yarn we recommend running `yarn create next-app` - **--use-npm** - Explicitly tell the CLI to bootstrap the app using npm. To bootstrap using yarn we recommend running `yarn create next-app`
......
# Analyzer Bundles example # Analyzer Bundles example
This example shows how to analyze the output bundles using [@next/bundle-analyzer](https://github.com/vercel/next.js/tree/master/packages/next-bundle-analyzer) This example shows how to analyze the output bundles using [@next/bundle-analyzer](https://github.com/vercel/next.js/tree/canary/packages/next-bundle-analyzer)
## Preview ## Preview
......
...@@ -20,7 +20,7 @@ Edit `next.config.js` and replace `'Next-gh-page-example'` by your project name. ...@@ -20,7 +20,7 @@ Edit `next.config.js` and replace `'Next-gh-page-example'` by your project name.
1. Create repository. 1. Create repository.
2. Link it to your github account. 2. Link it to your github account.
3. Publish your master branch. 3. Publish your default branch, e.g. `main`.
```bash ```bash
npm run deploy npm run deploy
......
...@@ -25,7 +25,7 @@ export default function Home() { ...@@ -25,7 +25,7 @@ export default function Home() {
</a> </a>
<a <a
href="https://github.com/vercel/next.js/tree/master/examples" href="https://github.com/vercel/next.js/tree/canary/examples"
className={styles.card} className={styles.card}
> >
<h3>Examples &rarr;</h3> <h3>Examples &rarr;</h3>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
This example serves as a conduit if you were using Apollo 1.X with Redux, and are migrating to Apollo 3.x, however, you have chosen not to manage your entire application state within Apollo (`apollo-link-state`). This example serves as a conduit if you were using Apollo 1.X with Redux, and are migrating to Apollo 3.x, however, you have chosen not to manage your entire application state within Apollo (`apollo-link-state`).
In 3.0.0, Apollo serves out-of-the-box support for redux in favor of Apollo's state management. This example aims to be an amalgamation of the [`with-apollo`](https://github.com/vercel/next.js/tree/master/examples/with-apollo) and [`with-redux`](https://github.com/vercel/next.js/tree/master/examples/with-redux) examples. In 3.0.0, Apollo serves out-of-the-box support for redux in favor of Apollo's state management. This example aims to be an amalgamation of the [`with-apollo`](https://github.com/vercel/next.js/tree/canary/examples/with-apollo) and [`with-redux`](https://github.com/vercel/next.js/tree/canary/examples/with-redux) examples.
To inspect the GraphQL API, use its [web IDE](https://nextjs-graphql-with-prisma-simple-foo.vercel.app/api). To inspect the GraphQL API, use its [web IDE](https://nextjs-graphql-with-prisma-simple-foo.vercel.app/api).
......
...@@ -41,7 +41,7 @@ export default function Home() { ...@@ -41,7 +41,7 @@ export default function Home() {
</a> </a>
<a <a
href="https://github.com/vercel/next.js/tree/master/examples" href="https://github.com/vercel/next.js/tree/canary/examples"
className={styles.card} className={styles.card}
> >
<h2>Examples &rarr;</h2> <h2>Examples &rarr;</h2>
......
...@@ -31,7 +31,7 @@ export default function Home() { ...@@ -31,7 +31,7 @@ export default function Home() {
</a> </a>
<a <a
href="https://github.com/vercel/next.js/tree/master/examples" href="https://github.com/vercel/next.js/tree/canary/examples"
className={styles.card} className={styles.card}
> >
<h3>Examples &rarr;</h3> <h3>Examples &rarr;</h3>
......
...@@ -43,7 +43,7 @@ export default function Home({ isConnected }) { ...@@ -43,7 +43,7 @@ export default function Home({ isConnected }) {
</a> </a>
<a <a
href="https://github.com/vercel/next.js/tree/master/examples" href="https://github.com/vercel/next.js/tree/canary/examples"
className={styles.card} className={styles.card}
> >
<h2>Examples &rarr;</h2> <h2>Examples &rarr;</h2>
......
...@@ -9,7 +9,7 @@ exports[`renders homepage unchanged 1`] = ` ...@@ -9,7 +9,7 @@ exports[`renders homepage unchanged 1`] = `
<h1 <h1
class="title" class="title"
> >
Welcome to Welcome to
<a <a
href="https://nextjs.org" href="https://nextjs.org"
> >
...@@ -19,7 +19,7 @@ exports[`renders homepage unchanged 1`] = ` ...@@ -19,7 +19,7 @@ exports[`renders homepage unchanged 1`] = `
<p <p
class="description" class="description"
> >
Get started by editing Get started by editing
<code> <code>
pages/index.js pages/index.js
</code> </code>
...@@ -51,7 +51,7 @@ exports[`renders homepage unchanged 1`] = ` ...@@ -51,7 +51,7 @@ exports[`renders homepage unchanged 1`] = `
</a> </a>
<a <a
class="card" class="card"
href="https://github.com/vercel/next.js/tree/master/examples" href="https://github.com/vercel/next.js/tree/canary/examples"
> >
<h3> <h3>
Examples → Examples →
...@@ -82,7 +82,7 @@ exports[`renders homepage unchanged 1`] = ` ...@@ -82,7 +82,7 @@ exports[`renders homepage unchanged 1`] = `
target="_blank" target="_blank"
> >
Powered by Powered by
<span <span
class="logo" class="logo"
> >
......
...@@ -32,7 +32,7 @@ export default function Home() { ...@@ -32,7 +32,7 @@ export default function Home() {
</a> </a>
<a <a
href="https://github.com/vercel/next.js/tree/master/examples" href="https://github.com/vercel/next.js/tree/canary/examples"
className={styles.card} className={styles.card}
> >
<h3>Examples &rarr;</h3> <h3>Examples &rarr;</h3>
......
...@@ -9,7 +9,7 @@ exports[`renders homepage unchanged 1`] = ` ...@@ -9,7 +9,7 @@ exports[`renders homepage unchanged 1`] = `
<h1 <h1
class="title" class="title"
> >
Welcome to Welcome to
<a <a
href="https://nextjs.org" href="https://nextjs.org"
> >
...@@ -19,7 +19,7 @@ exports[`renders homepage unchanged 1`] = ` ...@@ -19,7 +19,7 @@ exports[`renders homepage unchanged 1`] = `
<p <p
class="description" class="description"
> >
Get started by editing Get started by editing
<code> <code>
pages/index.js pages/index.js
</code> </code>
...@@ -51,7 +51,7 @@ exports[`renders homepage unchanged 1`] = ` ...@@ -51,7 +51,7 @@ exports[`renders homepage unchanged 1`] = `
</a> </a>
<a <a
class="card" class="card"
href="https://github.com/vercel/next.js/tree/master/examples" href="https://github.com/vercel/next.js/tree/canary/examples"
> >
<h3> <h3>
Examples → Examples →
...@@ -82,7 +82,7 @@ exports[`renders homepage unchanged 1`] = ` ...@@ -82,7 +82,7 @@ exports[`renders homepage unchanged 1`] = `
target="_blank" target="_blank"
> >
Powered by Powered by
<span <span
class="logo" class="logo"
> >
......
...@@ -32,7 +32,7 @@ export default function Home() { ...@@ -32,7 +32,7 @@ export default function Home() {
</a> </a>
<a <a
href="https://github.com/vercel/next.js/tree/master/examples" href="https://github.com/vercel/next.js/tree/canary/examples"
className={styles.card} className={styles.card}
> >
<h3>Examples &rarr;</h3> <h3>Examples &rarr;</h3>
......
...@@ -51,7 +51,7 @@ export default function Home() { ...@@ -51,7 +51,7 @@ export default function Home() {
</a> </a>
<a <a
href="https://github.com/vercel/next.js/tree/master/examples" href="https://github.com/vercel/next.js/tree/canary/examples"
className="card" className="card"
> >
<h3>Examples &rarr;</h3> <h3>Examples &rarr;</h3>
......
...@@ -75,7 +75,7 @@ export default function Home() { ...@@ -75,7 +75,7 @@ export default function Home() {
color="primary" color="primary"
size="sm" size="sm"
className="text-capitalize" className="text-capitalize"
href="https://github.com/vercel/next.js/tree/master/examples" href="https://github.com/vercel/next.js/tree/canary/examples"
> >
More &rarr; More &rarr;
</MDBBtn> </MDBBtn>
......
...@@ -39,7 +39,7 @@ export default function Home({ isConnected }) { ...@@ -39,7 +39,7 @@ export default function Home({ isConnected }) {
</a> </a>
<a <a
href="https://github.com/vercel/next.js/tree/master/examples" href="https://github.com/vercel/next.js/tree/canary/examples"
className="card" className="card"
> >
<h3>Examples &rarr;</h3> <h3>Examples &rarr;</h3>
......
...@@ -41,7 +41,7 @@ export default function Home() { ...@@ -41,7 +41,7 @@ export default function Home() {
</a> </a>
<a <a
href="https://github.com/vercel/next.js/tree/master/examples" href="https://github.com/vercel/next.js/tree/canary/examples"
className={styles.card} className={styles.card}
> >
<h2>Examples &rarr;</h2> <h2>Examples &rarr;</h2>
......
...@@ -20,7 +20,7 @@ const Home = () => ( ...@@ -20,7 +20,7 @@ const Home = () => (
<Card> <Card>
<Card.Content> <Card.Content>
<Content> <Content>
<Link href="https://github.com/vercel/next.js/tree/master/examples"> <Link href="https://github.com/vercel/next.js/tree/canary/examples">
<a> <a>
<Title as="h3">Examples &rarr;</Title> <Title as="h3">Examples &rarr;</Title>
<p> <p>
......
...@@ -49,7 +49,7 @@ export default function Home() { ...@@ -49,7 +49,7 @@ export default function Home() {
</Card.Text> </Card.Text>
<Button <Button
variant="primary" variant="primary"
href="https://github.com/vercel/next.js/tree/master/examples" href="https://github.com/vercel/next.js/tree/canary/examples"
> >
More &rarr; More &rarr;
</Button> </Button>
......
...@@ -6,7 +6,7 @@ In this case we are using [react-with-styles](https://github.com/airbnb/react-wi ...@@ -6,7 +6,7 @@ In this case we are using [react-with-styles](https://github.com/airbnb/react-wi
For this purpose we are extending the `<Document />` and injecting the server side rendered styles into the `<head>`. For this purpose we are extending the `<Document />` and injecting the server side rendered styles into the `<head>`.
We are using `pages/_index.js` from this example [with-aphrodite](https://github.com/vercel/next.js/tree/master/examples/with-aphrodite). We are using `pages/_index.js` from this example [with-aphrodite](https://github.com/vercel/next.js/tree/canary/examples/with-aphrodite).
## Preview ## Preview
......
...@@ -63,7 +63,7 @@ export default function Home() { ...@@ -63,7 +63,7 @@ export default function Home() {
</CardText> </CardText>
<Button <Button
color="primary" color="primary"
href="https://github.com/vercel/next.js/tree/master/examples" href="https://github.com/vercel/next.js/tree/canary/examples"
> >
More &rarr; More &rarr;
</Button> </Button>
......
...@@ -30,7 +30,7 @@ Deploy it to the cloud with [Vercel](https://vercel.com/new?utm_source=github&ut ...@@ -30,7 +30,7 @@ Deploy it to the cloud with [Vercel](https://vercel.com/new?utm_source=github&ut
## Notes ## Notes
In this example, we are going to use the Next.js example [with-redux](https://github.com/vercel/next.js/tree/master/examples/with-redux-persist) to see how you can add a layer of persistence for one of the state from global redux state. To know more about how to create a Next.js project with Redux, you can browse the example project [with-redux](https://github.com/vercel/next.js/tree/master/examples/with-redux) to know more about its implementation. In this example, we are going to use the Next.js example [with-redux](https://github.com/vercel/next.js/tree/canary/examples/with-redux-persist) to see how you can add a layer of persistence for one of the state from global redux state. To know more about how to create a Next.js project with Redux, you can browse the example project [with-redux](https://github.com/vercel/next.js/tree/canary/examples/with-redux) to know more about its implementation.
The Redux Persist has been initialized in `store.js`. You can modify the `redux-persist` configuration (In this example, we are persisting only one state termed `exampleData` which is added in the `persist configuration`) if you need something more with `redux-persist` by following their [docs](https://github.com/rt2zz/redux-persist/blob/master/README.md). To wrap out our component in the `Persist Gate` which rehydrates the global state with combining the persisted values and global state values, we'll have to make some modifications in the implementation of Redux in `pages/_app.js`. The Redux Persist has been initialized in `store.js`. You can modify the `redux-persist` configuration (In this example, we are persisting only one state termed `exampleData` which is added in the `persist configuration`) if you need something more with `redux-persist` by following their [docs](https://github.com/rt2zz/redux-persist/blob/master/README.md). To wrap out our component in the `Persist Gate` which rehydrates the global state with combining the persisted values and global state values, we'll have to make some modifications in the implementation of Redux in `pages/_app.js`.
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
Usually splitting your app state into `pages` feels natural, but sometimes you'll want to have global state for your app. This is an example using `redux` and `redux-saga` that works with universal rendering. This is just one way it can be done. If you have any suggestions or feedback please submit an issue or PR. Usually splitting your app state into `pages` feels natural, but sometimes you'll want to have global state for your app. This is an example using `redux` and `redux-saga` that works with universal rendering. This is just one way it can be done. If you have any suggestions or feedback please submit an issue or PR.
> This example and documentation is based on the [with-redux](https://github.com/vercel/next.js/tree/master/examples/with-redux) example. > This example and documentation is based on the [with-redux](https://github.com/vercel/next.js/tree/canary/examples/with-redux) example.
## Preview ## Preview
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
This example has two pages. The first page has a counter which can be incremented synchronously or asynchronously. The second page is a page which shows a list of github users. It fetches data from the github api using this [endpoint](api.github.com/users). This example has two pages. The first page has a counter which can be incremented synchronously or asynchronously. The second page is a page which shows a list of github users. It fetches data from the github api using this [endpoint](api.github.com/users).
Since rematch is utility which uses redux under the hood, some elements like `store.js` and `withRematch` are very similar to the `with-redux` example. Please go through the [`with-redux` example](https://github.com/vercel/next.js/tree/master/examples/with-redux) before reading further if you are not familiar with how redux is integrated with Next.js. Rematch is just an extension for Redux so a lot of elements are the same. Since rematch is utility which uses redux under the hood, some elements like `store.js` and `withRematch` are very similar to the `with-redux` example. Please go through the [`with-redux` example](https://github.com/vercel/next.js/tree/canary/examples/with-redux) before reading further if you are not familiar with how redux is integrated with Next.js. Rematch is just an extension for Redux so a lot of elements are the same.
## Preview ## Preview
......
...@@ -29,7 +29,7 @@ export default function Home() { ...@@ -29,7 +29,7 @@ export default function Home() {
</a> </a>
<a <a
href="https://github.com/vercel/next.js/tree/master/examples" href="https://github.com/vercel/next.js/tree/canary/examples"
className="card" className="card"
> >
<h3>Examples &rarr;</h3> <h3>Examples &rarr;</h3>
......
This examples was moved to [https://github.com/vercel/next.js/tree/master/examples/with-styled-jsx-plugins](https://github.com/vercel/next.js/tree/master/examples/with-styled-jsx-plugins) This examples was moved to [https://github.com/vercel/next.js/tree/canary/examples/with-styled-jsx-plugins](https://github.com/vercel/next.js/tree/canary/examples/with-styled-jsx-plugins)
...@@ -141,7 +141,7 @@ function ProtectedPage({ userId }) { ...@@ -141,7 +141,7 @@ function ProtectedPage({ userId }) {
</a> </a>
<a <a
href="https://github.com/vercel/next.js/tree/master/examples" href="https://github.com/vercel/next.js/tree/canary/examples"
className={styles.card} className={styles.card}
> >
<h3>Examples &rarr;</h3> <h3>Examples &rarr;</h3>
......
...@@ -45,7 +45,7 @@ export default function Home() { ...@@ -45,7 +45,7 @@ export default function Home() {
</a> </a>
<a <a
href="https://github.com/vercel/next.js/tree/master/examples" href="https://github.com/vercel/next.js/tree/canary/examples"
className="p-6 mt-6 text-left border w-96 rounded-xl hover:text-blue-600 focus:text-blue-600" className="p-6 mt-6 text-left border w-96 rounded-xl hover:text-blue-600 focus:text-blue-600"
> >
<h3 className="text-2xl font-bold">Examples &rarr;</h3> <h3 className="text-2xl font-bold">Examples &rarr;</h3>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
This example features how you use a different styling solution than [styled-jsx](https://github.com/vercel/styled-jsx) that also supports universal styles. That means we can serve the required styles for the first render within the HTML and then load the rest in the client. In this case we are using [typestyle](https://github.com/typestyle/typestyle). This example features how you use a different styling solution than [styled-jsx](https://github.com/vercel/styled-jsx) that also supports universal styles. That means we can serve the required styles for the first render within the HTML and then load the rest in the client. In this case we are using [typestyle](https://github.com/typestyle/typestyle).
For this purpose we are extending the `<Document />` and injecting the server side rendered styles into the `<head>`. Refer to [with-typescript](https://github.com/vercel/next.js/tree/master/examples/with-typescript) to use this with typescript. For this purpose we are extending the `<Document />` and injecting the server side rendered styles into the `<head>`. Refer to [with-typescript](https://github.com/vercel/next.js/tree/canary/examples/with-typescript) to use this with typescript.
## Preview ## Preview
......
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
"publish": { "publish": {
"npmClient": "npm", "npmClient": "npm",
"allowBranch": [ "allowBranch": [
"master",
"canary" "canary"
], ],
"registry": "https://registry.npmjs.org/" "registry": "https://registry.npmjs.org/"
......
...@@ -23,7 +23,7 @@ npx create-next-app blog-app ...@@ -23,7 +23,7 @@ npx create-next-app blog-app
`create-next-app` comes with the following options: `create-next-app` comes with the following options:
- **--ts, --typescript** - Initialize as a TypeScript project. - **--ts, --typescript** - Initialize as a TypeScript project.
- **-e, --example [name]|[github-url]** - An example to bootstrap the app with. You can use an example name from the [Next.js repo](https://github.com/vercel/next.js/tree/master/examples) or a GitHub URL. The URL can use any branch and/or subdirectory. - **-e, --example [name]|[github-url]** - An example to bootstrap the app with. You can use an example name from the [Next.js repo](https://github.com/vercel/next.js/tree/canary/examples) or a GitHub URL. The URL can use any branch and/or subdirectory.
- **--example-path &lt;path-to-example&gt;** - In a rare case, your GitHub URL might contain a branch name with a slash (e.g. bug/fix-1) and the path to the example (e.g. foo/bar). In this case, you must specify the path to the example separately: `--example-path foo/bar` - **--example-path &lt;path-to-example&gt;** - In a rare case, your GitHub URL might contain a branch name with a slash (e.g. bug/fix-1) and the path to the example (e.g. foo/bar). In this case, you must specify the path to the example separately: `--example-path foo/bar`
- **--use-npm** - Explicitly tell the CLI to bootstrap the app using npm. To bootstrap using yarn we recommend to run `yarn create next-app` - **--use-npm** - Explicitly tell the CLI to bootstrap the app using npm. To bootstrap using yarn we recommend to run `yarn create next-app`
......
...@@ -33,7 +33,7 @@ export default function Home() { ...@@ -33,7 +33,7 @@ export default function Home() {
</a> </a>
<a <a
href="https://github.com/vercel/next.js/tree/master/examples" href="https://github.com/vercel/next.js/tree/canary/examples"
className={styles.card} className={styles.card}
> >
<h2>Examples &rarr;</h2> <h2>Examples &rarr;</h2>
......
...@@ -34,7 +34,7 @@ const Home: NextPage = () => { ...@@ -34,7 +34,7 @@ const Home: NextPage = () => {
</a> </a>
<a <a
href="https://github.com/vercel/next.js/tree/master/examples" href="https://github.com/vercel/next.js/tree/canary/examples"
className={styles.card} className={styles.card}
> >
<h2>Examples &rarr;</h2> <h2>Examples &rarr;</h2>
......
...@@ -38,7 +38,7 @@ export default function Home() { ...@@ -38,7 +38,7 @@ export default function Home() {
</a> </a>
<a <a
href="https://github.com/vercel/next.js/tree/master/examples" href="https://github.com/vercel/next.js/tree/canary/examples"
className="p-6 mt-6 text-left border w-96 rounded-xl hover:text-blue-600 focus:text-blue-600" className="p-6 mt-6 text-left border w-96 rounded-xl hover:text-blue-600 focus:text-blue-600"
> >
<h3 className="text-2xl font-bold">Examples &rarr;</h3> <h3 className="text-2xl font-bold">Examples &rarr;</h3>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment