diff --git a/.github/ISSUE_TEMPLATE/1.bug_report.yml b/.github/ISSUE_TEMPLATE/1.bug_report.yml
index d08e0a87d..3e73aa706 100644
--- a/.github/ISSUE_TEMPLATE/1.bug_report.yml
+++ b/.github/ISSUE_TEMPLATE/1.bug_report.yml
@@ -10,7 +10,7 @@ body:
id: reproduction-link
attributes:
label: Link to reproduction
- description: Please add a link to a reproduction. See the fork [reproduction-guide](https://github.com/payloadcms/payload/blob/master/.github/reproduction-guide.md) for more information.
+ description: Please add a link to a reproduction. See the fork [reproduction-guide](https://github.com/payloadcms/payload/blob/main/.github/reproduction-guide.md) for more information.
validations:
required: true
- type: textarea
diff --git a/.github/reproduction-guide.md b/.github/reproduction-guide.md
index 85ea565d7..a5a660761 100644
--- a/.github/reproduction-guide.md
+++ b/.github/reproduction-guide.md
@@ -39,7 +39,7 @@ There are a couple ways run integration tests:
- **Granularly** - you can run individual tests in vscode by installing the Jest Runner plugin and using that to run individual tests. Clicking the `debug` button will run the test in debug mode allowing you to set break points.
-
+
- **Manually** - you can run all int tests in the `/test/_community/int.spec.ts` file by running the following command:
@@ -56,7 +56,7 @@ The easiest way to run E2E tests is to install
Once they are installed you can open the `testing` tab in vscode sidebar and drill down to the test you want to run, i.e. `/test/_community/e2e.spec.ts`
-
+
#### Notes
diff --git a/ISSUE_GUIDE.md b/ISSUE_GUIDE.md
index d64fec0e9..153d85b61 100644
--- a/ISSUE_GUIDE.md
+++ b/ISSUE_GUIDE.md
@@ -45,7 +45,7 @@ There are a couple ways to do this:
- **Granularly** - you can run individual tests in vscode by installing the Jest Runner plugin and using that to run individual tests. Clicking the `debug` button will run the test in debug mode allowing you to set break points.
-
+
- **Manually** - you can run all int tests in the `/test/_community/int.spec.ts` file by running the following command:
@@ -62,7 +62,7 @@ The easiest way to run E2E tests is to install
Once they are installed you can open the `testing` tab in vscode sidebar and drill down to the test you want to run, i.e. `/test/_community/e2e.spec.ts`
-
+
#### Notes
diff --git a/README.md b/README.md
index 008e6a5dd..c8ddbdb6c 100644
--- a/README.md
+++ b/README.md
@@ -56,17 +56,17 @@ Alternatively, it only takes about five minutes to [create an app from scratch](
Jumpstart your next project by starting with a pre-made template. These are production-ready, end-to-end solutions designed to get you to market as fast as possible.
-### [🛒 E-Commerce](https://github.com/payloadcms/payload/tree/master/templates/ecommerce)
+### [🛒 E-Commerce](https://github.com/payloadcms/payload/tree/main/templates/ecommerce)
Eliminate the need to combine Shopify and a CMS, and instead do it all with Payload + Stripe. Comes with a beautiful, fully functional front-end complete with shopping cart, checkout, orders, and much more.
-### [🌐 Website](https://github.com/payloadcms/payload/tree/master/templates/website)
+### [🌐 Website](https://github.com/payloadcms/payload/tree/main/templates/website)
Build any kind of website, blog, or portfolio from small to enterprise. Comes with a beautiful, fully functional front-end complete with posts, projects, comments, and much more.
-We're constantly adding more templates to our [Templates Directory](https://github.com/payloadcms/payload/tree/master/templates). If you maintain your own template, consider adding the `payload-template` topic to your GitHub repository for others to find.
+We're constantly adding more templates to our [Templates Directory](https://github.com/payloadcms/payload/tree/main/templates). If you maintain your own template, consider adding the `payload-template` topic to your GitHub repository for others to find.
-- [Official Templates](https://github.com/payloadcms/payload/tree/master/templates)
+- [Official Templates](https://github.com/payloadcms/payload/tree/main/templates)
- [Community Templates](https://github.com/topics/payload-template)
## ✨ Features
diff --git a/docs/admin/components.mdx b/docs/admin/components.mdx
index 3c7f63a7f..010ab0c66 100644
--- a/docs/admin/components.mdx
+++ b/docs/admin/components.mdx
@@ -27,7 +27,7 @@ You can override a set of admin panel-wide components by providing a component t
| **`BeforeNavLinks`** | Array of components to inject into the built-in Nav, _before_ the links themselves. |
| **`AfterNavLinks`** | Array of components to inject into the built-in Nav, _after_ the links. |
| **`BeforeDashboard`** | Array of components to inject into the built-in Dashboard, _before_ the default dashboard contents. |
-| **`AfterDashboard`** | Array of components to inject into the built-in Dashboard, _after_ the default dashboard contents. [Demo](https://github.com/payloadcms/payload/tree/master/test/admin/components/AfterDashboard/index.tsx) |
+| **`AfterDashboard`** | Array of components to inject into the built-in Dashboard, _after_ the default dashboard contents. [Demo](https://github.com/payloadcms/payload/tree/main/test/admin/components/AfterDashboard/index.tsx) |
| **`BeforeLogin`** | Array of components to inject into the built-in Login, _before_ the default login form. |
| **`AfterLogin`** | Array of components to inject into the built-in Login, _after_ the default login form. |
| **`logout.Button`** | A custom React component. |
@@ -423,6 +423,50 @@ const CustomTextField: React.FC = ({ path }) => {
components, including the useField hook, [click here](/docs/admin/hooks).
+<<<<<<< HEAD
+=======
+## Custom routes
+
+You can easily add your own custom routes to the Payload Admin panel using the `admin.components.routes` property. Payload currently uses the extremely powerful React Router v5.x and custom routes support all the properties of the React Router `` component.
+
+**Custom routes support the following properties:**
+
+| Property | Description |
+| ------------------ | ---------------------------------------------------------------------------------------------------------------------------- |
+| **`Component`** \* | Pass in the component that should be rendered when a user navigates to this route. |
+| **`path`** \* | React Router `path`. [See the React Router docs](https://v5.reactrouter.com/web/api/Route/path-string-string) for more info. |
+| **`exact`** | React Router `exact` property. [More](https://v5.reactrouter.com/web/api/Route/exact-bool) |
+| **`strict`** | React Router `strict` property. [More](https://v5.reactrouter.com/web/api/Route/strict-bool) |
+| **`sensitive`** | React Router `sensitive` property. [More](https://v5.reactrouter.com/web/api/Route/sensitive-bool) |
+
+_\* An asterisk denotes that a property is required._
+
+#### Custom route components
+
+Your custom route components will be given all the props that a React Router `` typically would receive, as well as two props from Payload:
+
+| Prop | Description |
+| ----------------------- | ---------------------------------------------------------------------------- |
+| **`user`** | The currently logged in user. Will be `null` if no user is logged in. |
+| **`canAccessAdmin`** \* | If the currently logged in user is allowed to access the admin panel or not. |
+
+
+ Note:
+
+ It's up to you to secure your custom routes. If your route requires a user to be logged in or to
+ have certain access rights, you should handle that within your route component yourself.
+
+
+#### Example
+
+You can find examples of custom route views in the [Payload source code `/test/admin/components/views` folder](https://github.com/payloadcms/payload/tree/main/test/admin/components/views). There, you'll find two custom routes:
+
+1. A custom view that uses the `DefaultTemplate`, which is the built-in Payload template that displays the sidebar and "eyebrow nav"
+1. A custom view that uses the `MinimalTemplate` - which is just a centered template used for things like logging in or out
+
+To see how to pass in your custom views to create custom routes of your own, take a look at the `admin.components.routes` property of the [Payload test admin config](https://github.com/payloadcms/payload/blob/main/test/admin/config.ts).
+
+>>>>>>> a14411776 (chore: update all references to main in docs, examples, and templates)
## Custom providers
As your admin customizations gets more complex you may want to share state between fields or other components. You can add custom providers to do add your own context to any Payload app for use in other custom components within the admin panel. Within your config add `admin.components.providers`, these can be used to share context or provide other custom functionality. Read the [React context](https://reactjs.org/docs/context.html) docs to learn more.
diff --git a/docs/admin/customizing-css.mdx b/docs/admin/customizing-css.mdx
index 1592418b5..5b429b9c7 100644
--- a/docs/admin/customizing-css.mdx
+++ b/docs/admin/customizing-css.mdx
@@ -31,7 +31,7 @@ To make it as easy as possible for you to override our styles, Payload uses [BEM
In addition to adding your own style definitions, you can also override Payload's built-in CSS variables. We use as much as possible behind the scenes, and you can override any of them that you'd like to.
-You can find the built-in Payload CSS variables within [`./src/admin/scss/app.scss`](https://github.com/payloadcms/payload/blob/master/src/admin/scss/app.scss) and [`./src/admin/scss/colors.scss`](https://github.com/payloadcms/payload/blob/master/src/admin/scss/colors.scss). The following variables are defined and can be overridden:
+You can find the built-in Payload CSS variables within [`./src/admin/scss/app.scss`](https://github.com/payloadcms/payload/blob/main/packages/payload/src/admin/scss/app.scss) and [`./src/admin/scss/colors.scss`](https://github.com/payloadcms/payload/blob/main/packages/payload/src/admin/scss/colors.scss). The following variables are defined and can be overridden:
- Breakpoints
- Base color shades (white to black by default)
diff --git a/docs/admin/hooks.mdx b/docs/admin/hooks.mdx
index cdd8e32a6..9fe7451ff 100644
--- a/docs/admin/hooks.mdx
+++ b/docs/admin/hooks.mdx
@@ -126,7 +126,7 @@ You can send the following actions to the `dispatchFields` function.
| **`REPLACE_STATE`** | Completely replaces form state |
| **`UPDATE`** | Update any property of a specific field's state |
-To see types for each action supported within the `dispatchFields` hook, check out the Form types [here](https://github.com/payloadcms/payload/blob/master/src/admin/components/forms/Form/types.ts).
+To see types for each action supported within the `dispatchFields` hook, check out the Form types [here](https://github.com/payloadcms/payload/blob/main/packages/payload/src/admin/components/forms/Form/types.ts).
### useForm
diff --git a/docs/admin/overview.mdx b/docs/admin/overview.mdx
index 243c15c3a..43ea2eda5 100644
--- a/docs/admin/overview.mdx
+++ b/docs/admin/overview.mdx
@@ -34,7 +34,7 @@ All options for the Admin panel are defined in your base Payload config file.
| `buildPath` | Specify an absolute path for where to store the built Admin panel bundle used in production. Defaults to `path.resolve(process.cwd(), 'build')`. |
| `meta` | Base meta data to use for the Admin panel. Included properties are `titleSuffix`, `ogImage`, and `favicon`. |
| `disable` | If set to `true`, the entire Admin panel will be disabled. |
-| `indexHTML` | Optionally replace the entirety of the `index.html` file used by the Admin panel. Reference the [base index.html file](https://github.com/payloadcms/payload/blob/master/src/admin/index.html) to ensure your replacement has the appropriate HTML elements. |
+| `indexHTML` | Optionally replace the entirety of the `index.html` file used by the Admin panel. Reference the [base index.html file](https://github.com/payloadcms/payload/blob/main/packages/payload/src/admin/index.html) to ensure your replacement has the appropriate HTML elements. |
| `css` | Absolute path to a stylesheet that you can use to override / customize the Admin panel styling. [More](/docs/admin/customizing-css). |
| `scss` | Absolute path to a Sass variables / mixins stylesheet meant to override Payload styles to make for an easy re-skinning of the Admin panel. [More](/docs/admin/customizing-css#overriding-scss-variables). |
| `dateFormat` | Global date format that will be used for all dates in the Admin panel. Any valid [date-fns](https://date-fns.org/) format pattern can be used. |
diff --git a/docs/configuration/i18n.mdx b/docs/configuration/i18n.mdx
index d699e58ad..1f97276b5 100644
--- a/docs/configuration/i18n.mdx
+++ b/docs/configuration/i18n.mdx
@@ -65,7 +65,7 @@ After a user logs in, they can change their language selection in the `/account`
Note:
If there is a language that Payload does not yet support, we accept code
- [contributions](https://github.com/payloadcms/payload/blob/master/contributing.md).
+ [contributions](https://github.com/payloadcms/payload/blob/main/contributing.md).
### Node Express
diff --git a/docs/plugins/overview.mdx b/docs/plugins/overview.mdx
index 2dc52d564..572509777 100644
--- a/docs/plugins/overview.mdx
+++ b/docs/plugins/overview.mdx
@@ -29,7 +29,7 @@ Writing plugins is no more complex than writing regular JavaScript. If you know
### How to install plugins
-The base Payload config allows for a `plugins` property which takes an `array` of [`Plugins`](https://github.com/payloadcms/payload/blob/master/src/config/types.ts#L21).
+The base Payload config allows for a `plugins` property which takes an `array` of [`Plugins`](https://github.com/payloadcms/payload/blob/main/packages/payload/src/config/types.ts).
```js
import { buildConfig } from 'payload/config'
diff --git a/examples/auth/next-app/README.md b/examples/auth/next-app/README.md
index 5c8983079..14945477d 100644
--- a/examples/auth/next-app/README.md
+++ b/examples/auth/next-app/README.md
@@ -1,14 +1,14 @@
# Payload Auth Example Front-End
-This is a [Payload](https://payloadcms.com) + [Next.js](https://nextjs.org) app using the [App Router](https://nextjs.org/docs/app) made explicitly for the [Payload Auth Example](https://github.com/payloadcms/payload/tree/master/examples/auth). It demonstrates how to authenticate your Next.js app using [Payload Authentication](https://payloadcms.com/docs/authentication/overview).
+This is a [Payload](https://payloadcms.com) + [Next.js](https://nextjs.org) app using the [App Router](https://nextjs.org/docs/app) made explicitly for the [Payload Auth Example](https://github.com/payloadcms/payload/tree/main/examples/auth). It demonstrates how to authenticate your Next.js app using [Payload Authentication](https://payloadcms.com/docs/authentication/overview).
-> This example uses the App Router, the latest API of Next.js. If your app is using the legacy [Pages Router](https://nextjs.org/docs/pages), check out the official [Pages Router Example](https://github.com/payloadcms/payload/tree/master/examples/auth/next-pages).
+> This example uses the App Router, the latest API of Next.js. If your app is using the legacy [Pages Router](https://nextjs.org/docs/pages), check out the official [Pages Router Example](https://github.com/payloadcms/payload/tree/main/examples/auth/next-pages).
## Getting Started
### Payload
-First you'll need a running Payload app. There is one made explicitly for this example and [can be found here](https://github.com/payloadcms/payload/tree/master/examples/auth/payload). If you have not done so already, clone it down and follow the setup instructions there. This will provide all the necessary APIs that your Next.js app requires for authentication.
+First you'll need a running Payload app. There is one made explicitly for this example and [can be found here](https://github.com/payloadcms/payload/tree/main/examples/auth/payload). If you have not done so already, clone it down and follow the setup instructions there. This will provide all the necessary APIs that your Next.js app requires for authentication.
### Next.js
@@ -18,7 +18,7 @@ First you'll need a running Payload app. There is one made explicitly for this e
4. `yarn dev` or `npm run dev` to start the server
5. `open http://localhost:3001` to see the result
-Once running, a user is automatically seeded in your local environment with some basic instructions. See the [Payload Auth Example](https://github.com/payloadcms/payload/tree/master/examples/auth) for full details.
+Once running, a user is automatically seeded in your local environment with some basic instructions. See the [Payload Auth Example](https://github.com/payloadcms/payload/tree/main/examples/auth) for full details.
## Learn More
@@ -32,7 +32,7 @@ You can check out [the Payload GitHub repository](https://github.com/payloadcms/
## Deployment
-The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new) from the creators of Next.js. You could also combine this app into a [single Express server](https://github.com/payloadcms/payload/tree/master/examples/custom-server) and deploy in to [Payload Cloud](https://payloadcms.com/new/import).
+The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new) from the creators of Next.js. You could also combine this app into a [single Express server](https://github.com/payloadcms/payload/tree/main/examples/custom-server) and deploy in to [Payload Cloud](https://payloadcms.com/new/import).
Check out our [Payload deployment documentation](https://payloadcms.com/docs/production/deployment) or the [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
diff --git a/examples/auth/next-app/app/_components/Header/index.tsx b/examples/auth/next-app/app/_components/Header/index.tsx
index ba6015f84..7e54351c9 100644
--- a/examples/auth/next-app/app/_components/Header/index.tsx
+++ b/examples/auth/next-app/app/_components/Header/index.tsx
@@ -14,14 +14,14 @@ export function Header() {
diff --git a/examples/auth/next-app/app/page.tsx b/examples/auth/next-app/app/page.tsx
index e281b49fa..1f4ca993d 100644
--- a/examples/auth/next-app/app/page.tsx
+++ b/examples/auth/next-app/app/page.tsx
@@ -20,7 +20,7 @@ export default function Home() {
App Router
{' made explicitly for the '}
-
+
Payload Auth Example
{". This example demonstrates how to implement Payload's "}
diff --git a/examples/auth/next-pages/README.md b/examples/auth/next-pages/README.md
index 178e87679..de5bcabd0 100644
--- a/examples/auth/next-pages/README.md
+++ b/examples/auth/next-pages/README.md
@@ -1,14 +1,14 @@
# Payload Auth Example Front-End
-This is a [Payload](https://payloadcms.com) + [Next.js](https://nextjs.org) app using the [Pages Router](https://nextjs.org/docs/pages) made explicitly for the [Payload Auth Example](https://github.com/payloadcms/payload/tree/master/examples/auth). It demonstrates how to authenticate your Next.js app using [Payload Authentication](https://payloadcms.com/docs/authentication/overview).
+This is a [Payload](https://payloadcms.com) + [Next.js](https://nextjs.org) app using the [Pages Router](https://nextjs.org/docs/pages) made explicitly for the [Payload Auth Example](https://github.com/payloadcms/payload/tree/main/examples/auth). It demonstrates how to authenticate your Next.js app using [Payload Authentication](https://payloadcms.com/docs/authentication/overview).
-> This example uses the Pages Router, the legacy API of Next.js. If your app is using the latest [App Router](https://nextjs.org/docs/pages), check out the official [App Router Example](https://github.com/payloadcms/payload/tree/master/examples/auth/next-app).
+> This example uses the Pages Router, the legacy API of Next.js. If your app is using the latest [App Router](https://nextjs.org/docs/pages), check out the official [App Router Example](https://github.com/payloadcms/payload/tree/main/examples/auth/next-app).
## Getting Started
### Payload
-First you'll need a running Payload app. There is one made explicitly for this example and [can be found here](https://github.com/payloadcms/payload/tree/master/examples/auth/payload). If you have not done so already, clone it down and follow the setup instructions there. This will provide all the necessary APIs that your Next.js app requires for authentication.
+First you'll need a running Payload app. There is one made explicitly for this example and [can be found here](https://github.com/payloadcms/payload/tree/main/examples/auth/payload). If you have not done so already, clone it down and follow the setup instructions there. This will provide all the necessary APIs that your Next.js app requires for authentication.
### Next.js
@@ -18,7 +18,7 @@ First you'll need a running Payload app. There is one made explicitly for this e
4. `yarn dev` or `npm run dev` to start the server
5. `open http://localhost:3001` to see the result
-Once running, a user is automatically seeded in your local environment with some basic instructions. See the [Payload Auth Example](https://github.com/payloadcms/payload/tree/master/examples/auth) for full details.
+Once running, a user is automatically seeded in your local environment with some basic instructions. See the [Payload Auth Example](https://github.com/payloadcms/payload/tree/main/examples/auth) for full details.
## Learn More
@@ -32,7 +32,7 @@ You can check out [the Payload GitHub repository](https://github.com/payloadcms/
## Deployment
-The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new) from the creators of Next.js. You could also combine this app into a [single Express server](https://github.com/payloadcms/payload/tree/master/examples/custom-server) and deploy in to [Payload Cloud](https://payloadcms.com/new/import).
+The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new) from the creators of Next.js. You could also combine this app into a [single Express server](https://github.com/payloadcms/payload/tree/main/examples/custom-server) and deploy in to [Payload Cloud](https://payloadcms.com/new/import).
Check out our [Payload deployment documentation](https://payloadcms.com/docs/production/deployment) or the [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
diff --git a/examples/auth/next-pages/src/components/Header/index.tsx b/examples/auth/next-pages/src/components/Header/index.tsx
index 7b7ebec73..da272f702 100644
--- a/examples/auth/next-pages/src/components/Header/index.tsx
+++ b/examples/auth/next-pages/src/components/Header/index.tsx
@@ -14,14 +14,14 @@ export const Header: React.FC = () => {
diff --git a/examples/auth/next-pages/src/pages/index.tsx b/examples/auth/next-pages/src/pages/index.tsx
index 65d4eead6..efcd80152 100644
--- a/examples/auth/next-pages/src/pages/index.tsx
+++ b/examples/auth/next-pages/src/pages/index.tsx
@@ -20,7 +20,7 @@ export default function Home() {
Pages Router
{' made explicitly for the '}
-
+
Payload Auth Example
{". This example demonstrates how to implement Payload's "}
diff --git a/examples/auth/payload/README.md b/examples/auth/payload/README.md
index 07007e2c9..48dc4f1dd 100644
--- a/examples/auth/payload/README.md
+++ b/examples/auth/payload/README.md
@@ -1,6 +1,6 @@
# Payload Auth Example
-The [Payload Auth Example](https://github.com/payloadcms/payload/tree/master/examples/auth) demonstrates how to implement [Payload Authentication](https://payloadcms.com/docs/authentication/overview). Follow the [Quick Start](#quick-start) to get up and running quickly. There are various fully working front-ends made explicitly for this example, including:
+The [Payload Auth Example](https://github.com/payloadcms/payload/tree/main/examples/auth) demonstrates how to implement [Payload Authentication](https://payloadcms.com/docs/authentication/overview). Follow the [Quick Start](#quick-start) to get up and running quickly. There are various fully working front-ends made explicitly for this example, including:
- [Next.js App Router](../next-app)
- [Next.js Pages Router](../next-pages)
diff --git a/examples/custom-server/src/app/layout.tsx b/examples/custom-server/src/app/layout.tsx
index 0099dd423..17ccebe81 100644
--- a/examples/custom-server/src/app/layout.tsx
+++ b/examples/custom-server/src/app/layout.tsx
@@ -19,12 +19,12 @@ export default function RootLayout({ children }: { children: React.ReactNode })
diff --git a/examples/custom-server/src/seed/index.ts b/examples/custom-server/src/seed/index.ts
index 7a852a78c..182a2108c 100644
--- a/examples/custom-server/src/seed/index.ts
+++ b/examples/custom-server/src/seed/index.ts
@@ -61,7 +61,7 @@ export const seed = async (payload: Payload): Promise => {
{
type: 'link',
linkType: 'custom',
- url: 'http://github.com/payloadcms/payload/tree/master/examples/custom-server',
+ url: 'http://github.com/payloadcms/payload/tree/main/examples/custom-server',
children: [
{
text: 'README.md',
diff --git a/examples/draft-preview/next-app/README.md b/examples/draft-preview/next-app/README.md
index a2713894e..e524b7342 100644
--- a/examples/draft-preview/next-app/README.md
+++ b/examples/draft-preview/next-app/README.md
@@ -1,14 +1,14 @@
# Payload Draft Preview Example Front-End
-This is a [Next.js](https://nextjs.org) app using the [App Router](https://nextjs.org/docs/app). It was made explicitly for Payload's [Draft Preview Example](https://github.com/payloadcms/payload/tree/master/examples/draft-preview/payload).
+This is a [Next.js](https://nextjs.org) app using the [App Router](https://nextjs.org/docs/app). It was made explicitly for Payload's [Draft Preview Example](https://github.com/payloadcms/payload/tree/main/examples/draft-preview/payload).
-> This example uses the App Router, the latest API of Next.js. If your app is using the legacy [Pages Router](https://nextjs.org/docs/pages), check out the official [Pages Router Example](https://github.com/payloadcms/payload/tree/master/examples/draft-preview/next-pages).
+> This example uses the App Router, the latest API of Next.js. If your app is using the legacy [Pages Router](https://nextjs.org/docs/pages), check out the official [Pages Router Example](https://github.com/payloadcms/payload/tree/main/examples/draft-preview/next-pages).
## Getting Started
### Payload
-First you'll need a running Payload app. There is one made explicitly for this example and [can be found here](https://github.com/payloadcms/payload/tree/master/examples/draft-preview/payload). If you have not done so already, clone it down and follow the setup instructions there. This will provide all the necessary APIs that your Next.js app requires for authentication.
+First you'll need a running Payload app. There is one made explicitly for this example and [can be found here](https://github.com/payloadcms/payload/tree/main/examples/draft-preview/payload). If you have not done so already, clone it down and follow the setup instructions there. This will provide all the necessary APIs that your Next.js app requires for authentication.
### Next.js
@@ -18,7 +18,7 @@ First you'll need a running Payload app. There is one made explicitly for this e
4. `yarn dev` or `npm run dev` to start the server
5. `open http://localhost:3001` to see the result
-Once running you will find a couple seeded pages on your local environment with some basic instructions. You can also start editing the pages by modifying the documents within Payload. See the [Draft Preview Example](https://github.com/payloadcms/payload/tree/master/examples/draft-preview/payload) for full details.
+Once running you will find a couple seeded pages on your local environment with some basic instructions. You can also start editing the pages by modifying the documents within Payload. See the [Draft Preview Example](https://github.com/payloadcms/payload/tree/main/examples/draft-preview/payload) for full details.
## Learn More
@@ -32,6 +32,6 @@ You can check out [the Payload GitHub repository](https://github.com/payloadcms/
## Deployment
-The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new) from the creators of Next.js. You could also combine this app into a [single Express server](https://github.com/payloadcms/payload/tree/master/examples/custom-server) and deploy in to [Payload Cloud](https://payloadcms.com/new/import).
+The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new) from the creators of Next.js. You could also combine this app into a [single Express server](https://github.com/payloadcms/payload/tree/main/examples/custom-server) and deploy in to [Payload Cloud](https://payloadcms.com/new/import).
Check out our [Payload deployment documentation](https://payloadcms.com/docs/production/deployment) or the [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
diff --git a/examples/draft-preview/next-app/app/_components/Header/index.tsx b/examples/draft-preview/next-app/app/_components/Header/index.tsx
index 924a5bf57..31681472e 100644
--- a/examples/draft-preview/next-app/app/_components/Header/index.tsx
+++ b/examples/draft-preview/next-app/app/_components/Header/index.tsx
@@ -23,14 +23,14 @@ export async function Header() {
diff --git a/examples/draft-preview/next-pages/README.md b/examples/draft-preview/next-pages/README.md
index a5f57ae00..dd073f5d8 100644
--- a/examples/draft-preview/next-pages/README.md
+++ b/examples/draft-preview/next-pages/README.md
@@ -1,14 +1,14 @@
# Payload Draft Preview Example Front-End
-This is a [Next.js](https://nextjs.org) app using the [Pages Router](https://nextjs.org/docs/pages). It was made explicitly for Payload's [Draft Preview Example](https://github.com/payloadcms/payload/tree/master/examples/draft-preview/payload).
+This is a [Next.js](https://nextjs.org) app using the [Pages Router](https://nextjs.org/docs/pages). It was made explicitly for Payload's [Draft Preview Example](https://github.com/payloadcms/payload/tree/main/examples/draft-preview/payload).
-> This example uses the Pages Router, the legacy API of Next.js. If your app is using the latest [App Router](https://nextjs.org/docs/app), check out the official [App Router Example](https://github.com/payloadcms/payload/tree/master/examples/draft-preview/next-app).
+> This example uses the Pages Router, the legacy API of Next.js. If your app is using the latest [App Router](https://nextjs.org/docs/app), check out the official [App Router Example](https://github.com/payloadcms/payload/tree/main/examples/draft-preview/next-app).
## Getting Started
### Payload
-First you'll need a running Payload app. There is one made explicitly for this example and [can be found here](https://github.com/payloadcms/payload/tree/master/examples/draft-preview/payload). If you have not done so already, clone it down and follow the setup instructions there. This will provide all the necessary APIs that your Next.js app requires for authentication.
+First you'll need a running Payload app. There is one made explicitly for this example and [can be found here](https://github.com/payloadcms/payload/tree/main/examples/draft-preview/payload). If you have not done so already, clone it down and follow the setup instructions there. This will provide all the necessary APIs that your Next.js app requires for authentication.
### Next.js
@@ -18,7 +18,7 @@ First you'll need a running Payload app. There is one made explicitly for this e
4. `yarn dev` or `npm run dev` to start the server
5. `open http://localhost:3001` to see the result
-Once running you will find a couple seeded pages on your local environment with some basic instructions. You can also start editing the pages by modifying the documents within Payload. See the [Draft Preview Example](https://github.com/payloadcms/payload/tree/master/examples/draft-preview/payload) for full details.
+Once running you will find a couple seeded pages on your local environment with some basic instructions. You can also start editing the pages by modifying the documents within Payload. See the [Draft Preview Example](https://github.com/payloadcms/payload/tree/main/examples/draft-preview/payload) for full details.
## Learn More
@@ -32,6 +32,6 @@ You can check out [the Payload GitHub repository](https://github.com/payloadcms/
## Deployment
-The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new) from the creators of Next.js. You could also combine this app into a [single Express server](https://github.com/payloadcms/payload/tree/master/examples/custom-server) and deploy in to [Payload Cloud](https://payloadcms.com/new/import).
+The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new) from the creators of Next.js. You could also combine this app into a [single Express server](https://github.com/payloadcms/payload/tree/main/examples/custom-server) and deploy in to [Payload Cloud](https://payloadcms.com/new/import).
Check out our [Payload deployment documentation](https://payloadcms.com/docs/production/deployment) or the [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
diff --git a/examples/draft-preview/next-pages/src/components/Header/index.tsx b/examples/draft-preview/next-pages/src/components/Header/index.tsx
index 781ae908d..16905ef73 100644
--- a/examples/draft-preview/next-pages/src/components/Header/index.tsx
+++ b/examples/draft-preview/next-pages/src/components/Header/index.tsx
@@ -21,14 +21,14 @@ export const HeaderBar: React.FC = ({ children }) => {
diff --git a/examples/draft-preview/payload/README.md b/examples/draft-preview/payload/README.md
index 08e4da03a..c919a1b0a 100644
--- a/examples/draft-preview/payload/README.md
+++ b/examples/draft-preview/payload/README.md
@@ -1,6 +1,6 @@
# Payload Draft Preview Example
-The [Payload Draft Preview Example](https://github.com/payloadcms/payload/tree/master/examples/draft-preview/payload) demonstrates how to implement draft preview in [Payload](https://github.com/payloadcms/payload) using [Versions](https://payloadcms.com/docs/versions/overview) and [Drafts](https://payloadcms.com/docs/versions/drafts). Draft preview allows you to see content on your front-end before it is published. There are various fully working front-ends made explicitly for this example, including:
+The [Payload Draft Preview Example](https://github.com/payloadcms/payload/tree/main/examples/draft-preview/payload) demonstrates how to implement draft preview in [Payload](https://github.com/payloadcms/payload) using [Versions](https://payloadcms.com/docs/versions/overview) and [Drafts](https://payloadcms.com/docs/versions/drafts). Draft preview allows you to see content on your front-end before it is published. There are various fully working front-ends made explicitly for this example, including:
- [Next.js App Router](../next-app)
- [Next.js Pages Router](../next-pages)
@@ -30,7 +30,7 @@ See the [Collections](https://payloadcms.com/docs/configuration/collections) doc
The `users` collection is auth-enabled which provides access to the admin panel. When previewing documents on your front-end, the user's JWT is used to authenticate the request. See [Pages](#pages) for more details.
- For additional help with authentication, see the [Authentication](https://payloadcms.com/docs/authentication/overview#authentication-overview) docs or the official [Auth Example](https://github.com/payloadcms/payload/tree/master/examples/auth).
+ For additional help with authentication, see the [Authentication](https://payloadcms.com/docs/authentication/overview#authentication-overview) docs or the official [Auth Example](https://github.com/payloadcms/payload/tree/main/examples/auth).
- #### Pages
diff --git a/examples/draft-preview/payload/src/seed/home.ts b/examples/draft-preview/payload/src/seed/home.ts
index f248531aa..e52874af0 100644
--- a/examples/draft-preview/payload/src/seed/home.ts
+++ b/examples/draft-preview/payload/src/seed/home.ts
@@ -21,7 +21,7 @@ export const home: Partial = {
{
type: 'link',
newTab: true,
- url: 'https://github.com/payloadcms/payload/tree/master/examples/redirects',
+ url: 'https://github.com/payloadcms/payload/tree/main/examples/redirects',
children: [{ text: '' }],
},
{ text: '' },
@@ -29,7 +29,7 @@ export const home: Partial = {
type: 'link',
linkType: 'custom',
newTab: true,
- url: 'https://github.com/payloadcms/payload/tree/master/examples/draft-preview/payload',
+ url: 'https://github.com/payloadcms/payload/tree/main/examples/draft-preview/payload',
children: [{ text: 'Draft Preview Example' }],
},
{ text: '. This example demonstrates how to implement draft preview into Payload using ' },
diff --git a/examples/multi-tenant/README.md b/examples/multi-tenant/README.md
index 082d5625a..9cf71655c 100644
--- a/examples/multi-tenant/README.md
+++ b/examples/multi-tenant/README.md
@@ -28,7 +28,7 @@ See the [Collections](https://payloadcms.com/docs/configuration/collections) doc
The `users` collection is auth-enabled and encompass both app-wide and tenant-scoped users based on the value of their `roles` and `tenants` fields. Users with the role `super-admin` can manage your entire application, while users with the _tenant role_ of `admin` have limited access to the platform and can manage only the tenant(s) they are assigned to, see [Tenants](#tenants) for more details.
- For additional help with authentication, see the official [Auth Example](https://github.com/payloadcms/payload/tree/master/examples/auth/cms#readme) or the [Authentication](https://payloadcms.com/docs/authentication/overview#authentication-overview) docs.
+ For additional help with authentication, see the official [Auth Example](https://github.com/payloadcms/payload/tree/main/examples/auth/cms#readme) or the [Authentication](https://payloadcms.com/docs/authentication/overview#authentication-overview) docs.
- #### Tenants
diff --git a/examples/redirects/cms/src/seed/home.ts b/examples/redirects/cms/src/seed/home.ts
index 162cbddae..f45b48bf5 100644
--- a/examples/redirects/cms/src/seed/home.ts
+++ b/examples/redirects/cms/src/seed/home.ts
@@ -25,7 +25,7 @@ export const home: Partial = {
{
type: 'link',
linkType: 'custom',
- url: 'https://github.com/payloadcms/payload/tree/master/examples/redirects/cms',
+ url: 'https://github.com/payloadcms/payload/tree/main/examples/redirects/cms',
children: [
{
text: 'Redirects Example',
diff --git a/examples/redirects/nextjs/README.md b/examples/redirects/nextjs/README.md
index bed292b5a..e99f4b842 100644
--- a/examples/redirects/nextjs/README.md
+++ b/examples/redirects/nextjs/README.md
@@ -1,6 +1,6 @@
# Redirects Example Front-End
-This is a [Next.js](https://nextjs.org/) app made explicitly for Payload's [Redirects Example](https://github.com/payloadcms/payload/tree/master/examples/redirects/cms).
+This is a [Next.js](https://nextjs.org/) app made explicitly for Payload's [Redirects Example](https://github.com/payloadcms/payload/tree/main/examples/redirects/cms).
## Getting Started
@@ -16,7 +16,7 @@ First you'll need a running CMS. If you have not done so already, open up the `c
4. `yarn dev` or `npm run dev` to start the server
5. `open http://localhost:3000` to see the result
-Once running you will find a couple seeded pages on your local environment with some basic instructions. You can also start editing the pages by modifying the documents within your CMS. See the [Redirects Example CMS](https://github.com/payloadcms/payload/tree/master/examples/redirects/cms) for full details.
+Once running you will find a couple seeded pages on your local environment with some basic instructions. You can also start editing the pages by modifying the documents within your CMS. See the [Redirects Example CMS](https://github.com/payloadcms/payload/tree/main/examples/redirects/cms) for full details.
## Learn More
diff --git a/scripts/list_published_packages.sh b/scripts/list_published_packages.sh
index ad8832630..55a78c9a7 100755
--- a/scripts/list_published_packages.sh
+++ b/scripts/list_published_packages.sh
@@ -2,20 +2,6 @@
# List all published packages
-# parse params: tag=beta or blank string ''
-tag=${1:-}
-
-echo
-
-if [ -n "$tag" ]; then
- echo "Listing packages with tag: $tag"
- tag="@$tag"
-else
- echo "Listing latest packages"
- tag=""
-fi
-echo
-
packages=$(find packages -name package.json -type f -exec grep -L '"private": true' {} \; | xargs jq -r '.name')
# sort alphabetically
@@ -23,7 +9,11 @@ packages=$(echo "$packages" | tr ' ' '\n' | sort -u | tr '\n' ' ')
# Loop through each package and print the name and version. Print as table
+printf "%-30s %-20s %-20s\n" "package" "latest" "beta"
+
for package in $packages; do
- version=$(npm view "$package""$tag" version 2> /dev/null || echo "N/A")
- printf "%-30s %s\n" "$package" "$version"
+ info=$(npm view "$package" dist-tags --json)
+ latest=$(echo "$info" | jq -r '.latest')
+ beta=$(echo "$info" | jq -r '.beta')
+ printf "%-30s %-20s %-20s\n" "$package" "$latest" "$beta"
done
diff --git a/scripts/publish-multiple.ts b/scripts/publish-multiple.ts
index 1bec2b1c0..4804954be 100755
--- a/scripts/publish-multiple.ts
+++ b/scripts/publish-multiple.ts
@@ -22,6 +22,11 @@ async function main() {
process.exit(1)
}
+ if (packageNames.length > 1 && packageNames.find((p) => p === 'payload')) {
+ console.error(chalk.bold.red('Cannot publish payload with other packages'))
+ process.exit(1)
+ }
+
console.log(`\n${chalk.bold.green('Publishing packages:')}\n`)
console.log(`${packageNames.map((p) => ` ${p}`).join('\n')}`)
console.log('\n')
@@ -59,7 +64,7 @@ async function main() {
const newVersion = packageObj.version
execSync(`git commit -m "chore(release): ${packageName}@${newVersion}"`, execOpts)
- execSync(`pnpm publish -C ${packageDir} --tag beta --no-git-checks`, execOpts)
+ execSync(`pnpm publish -C ${packageDir} --tag latest --no-git-checks`, execOpts)
results.push({ name: packageName, success: true })
} catch (error) {
console.error(`ERROR: ${error.message}`)
diff --git a/templates/blank/README.md b/templates/blank/README.md
index b1ef01c96..d55c8e823 100644
--- a/templates/blank/README.md
+++ b/templates/blank/README.md
@@ -2,7 +2,7 @@
A blank template for [Payload](https://github.com/payloadcms/payload) to help you get up and running quickly. This repo may have been created by running `npx create-payload-app` and selecting the "blank" template or by cloning this template on [Payload Cloud](https://payloadcms.com/new/clone/blank).
-See the official [Examples Directory](https://github.com/payloadcms/payload/tree/master/examples) for details on how to use Payload in a variety of different ways.
+See the official [Examples Directory](https://github.com/payloadcms/payload/tree/main/examples) for details on how to use Payload in a variety of different ways.
## Development
diff --git a/templates/ecommerce/README.md b/templates/ecommerce/README.md
index 171ef6735..de3e479f9 100644
--- a/templates/ecommerce/README.md
+++ b/templates/ecommerce/README.md
@@ -1,6 +1,6 @@
# Payload E-Commerce Template
-This is the official [Payload E-Commerce Template](https://github.com/payloadcms/payload/blob/master/templates/ecommerce). Use it to power e-commerce businesses and online stores of all sizes. This repo includes a fully-working backend, enterprise-grade admin panel, and a beautifully designed, production-ready website.
+This is the official [Payload E-Commerce Template](https://github.com/payloadcms/payload/blob/main/templates/ecommerce). Use it to power e-commerce businesses and online stores of all sizes. This repo includes a fully-working backend, enterprise-grade admin panel, and a beautifully designed, production-ready website.
This template is right for you if you are selling:
@@ -65,7 +65,7 @@ See the [Collections](https://payloadcms.com/docs/configuration/collections) do
Users are auth-enabled and encompass both admins and customers based on the value of their `roles` field. Only `admin` users can access your admin panel to manage your store whereas `customer` can authenticate on your front-end to create [shopping carts](#shopping-cart) and place [orders](#orders) but have limited access to the platform. See [Access Control](#access-control) for more details.
- For additional help, see the official [Auth Example](https://github.com/payloadcms/payload/tree/master/examples/auth) or the [Authentication](https://payloadcms.com/docs/authentication/overview#authentication-overview) docs.
+ For additional help, see the official [Auth Example](https://github.com/payloadcms/payload/tree/main/examples/auth) or the [Authentication](https://payloadcms.com/docs/authentication/overview#authentication-overview) docs.
- #### Products
@@ -234,7 +234,7 @@ All pages and products are draft-enabled so you can preview them before publishi
Since the front-end of this template is statically generated, this also means that pages and products will need to be regenerated as changes are made to published documents. To do this, we use an `afterChange` hook to regenerate the front-end when a document has changed and its `_status` is `published`.
-For more details on how to extend this functionality, see the official [Draft Preview Example](https://github.com/payloadcms/payload/tree/master/examples/draft-preview).
+For more details on how to extend this functionality, see the official [Draft Preview Example](https://github.com/payloadcms/payload/tree/main/examples/draft-preview).
## SEO
@@ -246,7 +246,7 @@ If you are migrating an existing site or moving content to a new URL, you can us
## Website
-This template includes a beautifully designed, production-ready front-end built with the [Next.js App Router](https://nextjs.org), served right alongside your Payload app in a single Express server. This makes is so that you can deploy both apps simultaneously and host them together. If you prefer a different front-end framework, this pattern works for any framework that supports a custom server. If you prefer to host your website separately from Payload, you can easily [Eject](#eject) the front-end out from this template to swap in your own, or to use it as a standalone CMS. For more details, see the official [Custom Server Example](https://github.com/payloadcms/payload/tree/master/examples/custom-server).
+This template includes a beautifully designed, production-ready front-end built with the [Next.js App Router](https://nextjs.org), served right alongside your Payload app in a single Express server. This makes is so that you can deploy both apps simultaneously and host them together. If you prefer a different front-end framework, this pattern works for any framework that supports a custom server. If you prefer to host your website separately from Payload, you can easily [Eject](#eject) the front-end out from this template to swap in your own, or to use it as a standalone CMS. For more details, see the official [Custom Server Example](https://github.com/payloadcms/payload/tree/main/examples/custom-server).
Core features:
@@ -277,7 +277,7 @@ If you prefer another front-end framework or would like to use Payload as a stan
> Note: Your eject script may not work as expected if you've made significant modifications to your project. If you run into any issues, compare your project's dependencies and file structure with this template. See [./src/eject](./src/eject) for full details.
-For more details on how setup a custom server, see the official [Custom Server Example](https://github.com/payloadcms/payload/tree/master/examples/custom-server).
+For more details on how setup a custom server, see the official [Custom Server Example](https://github.com/payloadcms/payload/tree/main/examples/custom-server).
## Development
diff --git a/templates/ecommerce/src/app/(pages)/cart/page.tsx b/templates/ecommerce/src/app/(pages)/cart/page.tsx
index 6c49af3ee..8c0777f8d 100644
--- a/templates/ecommerce/src/app/(pages)/cart/page.tsx
+++ b/templates/ecommerce/src/app/(pages)/cart/page.tsx
@@ -74,7 +74,7 @@ export default async function Cart() {
{' then set them as environment variables. See the '}
diff --git a/templates/ecommerce/src/app/(pages)/checkout/page.tsx b/templates/ecommerce/src/app/(pages)/checkout/page.tsx
index cecc57b63..d57c04d0b 100644
--- a/templates/ecommerce/src/app/(pages)/checkout/page.tsx
+++ b/templates/ecommerce/src/app/(pages)/checkout/page.tsx
@@ -46,7 +46,7 @@ export default async function Checkout() {
{' then set them as environment variables. See the '}
diff --git a/templates/ecommerce/src/app/_components/Footer/index.tsx b/templates/ecommerce/src/app/_components/Footer/index.tsx
index 4b1605f08..63be39e71 100644
--- a/templates/ecommerce/src/app/_components/Footer/index.tsx
+++ b/templates/ecommerce/src/app/_components/Footer/index.tsx
@@ -31,7 +31,7 @@ export async function Footer() {
@@ -42,7 +42,7 @@ export async function Footer() {
})}
Admin
diff --git a/templates/ecommerce/src/app/_components/Header/index.tsx b/templates/ecommerce/src/app/_components/Header/index.tsx
index a62dd7944..8244c56f7 100644
--- a/templates/ecommerce/src/app/_components/Header/index.tsx
+++ b/templates/ecommerce/src/app/_components/Header/index.tsx
@@ -37,7 +37,7 @@ export async function Header() {
diff --git a/templates/ecommerce/src/payload/components/BeforeDashboard/index.tsx b/templates/ecommerce/src/payload/components/BeforeDashboard/index.tsx
index 6a5f61d10..999ad5f68 100644
--- a/templates/ecommerce/src/payload/components/BeforeDashboard/index.tsx
+++ b/templates/ecommerce/src/payload/components/BeforeDashboard/index.tsx
@@ -35,7 +35,7 @@ const BeforeDashboard: React.FC = () => {
'. Create a new account if needed, then copy them into your environment variables and restart your server. See the '
}
diff --git a/templates/ecommerce/src/payload/seed/home-static.ts b/templates/ecommerce/src/payload/seed/home-static.ts
index 4c8576c21..2a1116804 100644
--- a/templates/ecommerce/src/payload/seed/home-static.ts
+++ b/templates/ecommerce/src/payload/seed/home-static.ts
@@ -60,7 +60,7 @@ export const staticHome: Page = {
{
type: 'link',
linkType: 'custom',
- url: 'https://github.com/payloadcms/payload/tree/master/templates/ecommerce',
+ url: 'https://github.com/payloadcms/payload/tree/main/templates/ecommerce',
newTab: true,
children: [
{
diff --git a/templates/ecommerce/src/payload/seed/home.ts b/templates/ecommerce/src/payload/seed/home.ts
index 386be6cad..ada2c08bd 100644
--- a/templates/ecommerce/src/payload/seed/home.ts
+++ b/templates/ecommerce/src/payload/seed/home.ts
@@ -41,7 +41,7 @@ export const home: Partial = {
{
type: 'link',
linkType: 'custom',
- url: 'https://github.com/payloadcms/payload/tree/master/templates/ecommerce',
+ url: 'https://github.com/payloadcms/payload/tree/main/templates/ecommerce',
newTab: true,
children: [
{
@@ -75,7 +75,7 @@ export const home: Partial = {
appearance: 'secondary',
reference: null,
label: 'View on GitHub',
- url: 'https://github.com/payloadcms/payload/tree/master/templates/ecommerce',
+ url: 'https://github.com/payloadcms/payload/tree/main/templates/ecommerce',
newTab: true,
},
},
diff --git a/templates/website/README.md b/templates/website/README.md
index ada07d3a6..38ce6fc77 100644
--- a/templates/website/README.md
+++ b/templates/website/README.md
@@ -1,6 +1,6 @@
# Payload Website Template
-This is the official [Payload Website Template](https://github.com/payloadcms/payload/blob/master/templates/website). Use it to power websites, blogs, or portfolios from small to enterprise. This repo includes a fully-working backend, enterprise-grade admin panel, and a beautifully designed, production-ready website.
+This is the official [Payload Website Template](https://github.com/payloadcms/payload/blob/main/templates/website). Use it to power websites, blogs, or portfolios from small to enterprise. This repo includes a fully-working backend, enterprise-grade admin panel, and a beautifully designed, production-ready website.
This template is right for you if you are working on:
@@ -66,7 +66,7 @@ See the [Collections](https://payloadcms.com/docs/configuration/collections) doc
Users are auth-enabled and encompass both admins and regular users based on the value of their `roles` field. Only `admin` users can access your admin panel to manage your website whereas `user` can authenticate on your front-end to leave [comments](#comments) and read [premium content](#premium-content) but have limited access to the platform. See [Access Control](#access-control) for more details.
- For additional help, see the official [Auth Example](https://github.com/payloadcms/payload/tree/master/examples/auth) or the [Authentication](https://payloadcms.com/docs/authentication/overview#authentication-overview) docs.
+ For additional help, see the official [Auth Example](https://github.com/payloadcms/payload/tree/main/examples/auth) or the [Authentication](https://payloadcms.com/docs/authentication/overview#authentication-overview) docs.
- #### Posts
@@ -165,7 +165,7 @@ All posts, projects, and pages are draft-enabled so you can preview them before
Since the front-end of this template is statically generated, this also means that pages, posts, and projects will need to be regenerated as changes are made to published documents. To do this, we use an `afterChange` hook to regenerate the front-end when a document has changed and its `_status` is `published`.
-For more details on how to extend this functionality, see the official [Draft Preview Example](https://github.com/payloadcms/payload/tree/master/examples/draft-preview).
+For more details on how to extend this functionality, see the official [Draft Preview Example](https://github.com/payloadcms/payload/tree/main/examples/draft-preview).
## SEO
@@ -177,7 +177,7 @@ If you are migrating an existing site or moving content to a new URL, you can us
## Website
-This template includes a beautifully designed, production-ready front-end built with the [Next.js App Router](https://nextjs.org), served right alongside your Payload app in a single Express server. This makes is so that you can deploy both apps simultaneously and host them together. If you prefer a different front-end framework, this pattern works for any framework that supports a custom server. If you prefer to host your website separately from Payload, you can easily [Eject](#eject) the front-end out from this template to swap in your own, or to use it as a standalone CMS. For more details, see the official [Custom Server Example](https://github.com/payloadcms/payload/tree/master/examples/custom-server).
+This template includes a beautifully designed, production-ready front-end built with the [Next.js App Router](https://nextjs.org), served right alongside your Payload app in a single Express server. This makes is so that you can deploy both apps simultaneously and host them together. If you prefer a different front-end framework, this pattern works for any framework that supports a custom server. If you prefer to host your website separately from Payload, you can easily [Eject](#eject) the front-end out from this template to swap in your own, or to use it as a standalone CMS. For more details, see the official [Custom Server Example](https://github.com/payloadcms/payload/tree/main/examples/custom-server).
Core features:
@@ -207,7 +207,7 @@ If you prefer another front-end framework or would like to use Payload as a stan
> Note: Your eject script may not work as expected if you've made significant modifications to your project. If you run into any issues, compare your project's dependencies and file structure with this template. See [./src/eject](./src/eject) for full details.
-For more details on how setup a custom server, see the official [Custom Server Example](https://github.com/payloadcms/payload/tree/master/examples/custom-server).
+For more details on how setup a custom server, see the official [Custom Server Example](https://github.com/payloadcms/payload/tree/main/examples/custom-server).
## Development
diff --git a/templates/website/src/app/_components/Footer/index.tsx b/templates/website/src/app/_components/Footer/index.tsx
index b53bc4049..8597c2bbc 100644
--- a/templates/website/src/app/_components/Footer/index.tsx
+++ b/templates/website/src/app/_components/Footer/index.tsx
@@ -31,7 +31,7 @@ export async function Footer() {
@@ -42,7 +42,7 @@ export async function Footer() {
})}
Admin
diff --git a/templates/website/src/app/_components/Header/index.tsx b/templates/website/src/app/_components/Header/index.tsx
index a62dd7944..4efffcbae 100644
--- a/templates/website/src/app/_components/Header/index.tsx
+++ b/templates/website/src/app/_components/Header/index.tsx
@@ -37,7 +37,7 @@ export async function Header() {
diff --git a/templates/website/src/payload/seed/home-static.ts b/templates/website/src/payload/seed/home-static.ts
index b22e67aa4..4752a9732 100644
--- a/templates/website/src/payload/seed/home-static.ts
+++ b/templates/website/src/payload/seed/home-static.ts
@@ -61,7 +61,7 @@ export const staticHome: Page = {
{
type: 'link',
linkType: 'custom',
- url: 'https://github.com/payloadcms/payload/tree/master/templates/website',
+ url: 'https://github.com/payloadcms/payload/tree/main/templates/website',
newTab: true,
children: [
{
diff --git a/templates/website/src/payload/seed/home.ts b/templates/website/src/payload/seed/home.ts
index 6d55db8b6..885553240 100644
--- a/templates/website/src/payload/seed/home.ts
+++ b/templates/website/src/payload/seed/home.ts
@@ -41,7 +41,7 @@ export const home: Partial = {
{
type: 'link',
linkType: 'custom',
- url: 'https://github.com/payloadcms/payload/tree/master/templates/website',
+ url: 'https://github.com/payloadcms/payload/tree/main/templates/website',
newTab: true,
children: [
{
diff --git a/test/live-preview/next-app/app/_components/Footer/index.tsx b/test/live-preview/next-app/app/_components/Footer/index.tsx
index bacbbd734..7e9adc145 100644
--- a/test/live-preview/next-app/app/_components/Footer/index.tsx
+++ b/test/live-preview/next-app/app/_components/Footer/index.tsx
@@ -20,7 +20,7 @@ export async function Footer() {
@@ -29,7 +29,7 @@ export async function Footer() {
return
})}
Admin
-
+
Source Code
Payload
diff --git a/test/live-preview/next-app/app/_components/Header/index.tsx b/test/live-preview/next-app/app/_components/Header/index.tsx
index 29daa2eb8..cedf638e1 100644
--- a/test/live-preview/next-app/app/_components/Header/index.tsx
+++ b/test/live-preview/next-app/app/_components/Header/index.tsx
@@ -21,7 +21,7 @@ export async function Header() {