Skip to content

Commit 0223c10

Browse files
committed
Updating dash instructions for Pages docs
1 parent 7f7318b commit 0223c10

35 files changed

+222
-207
lines changed

src/content/docs/pages/configuration/api.mdx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ banner:
88
id: pages-migrate-to-workers
99
---
1010

11-
import { APIRequest } from "~/components";
11+
import { APIRequest, DashButton } from "~/components";
1212

1313
The [Pages API](/api/resources/pages/subresources/projects/methods/list/) empowers you to build automations and integrate Pages with your development workflow. At a high level, the API endpoints let you manage deployments and builds and configure projects. Cloudflare supports [Deploy Hooks](/pages/configuration/deploy-hooks/) for headless CMS deployments. Refer to the [API documentation](https://api.cloudflare.com/) for a full breakdown of object types and endpoints.
1414

@@ -18,10 +18,9 @@ The [Pages API](/api/resources/pages/subresources/projects/methods/list/) empowe
1818

1919
To create an API token:
2020

21-
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com).
22-
2. Select the user icon on the top right of your dashboard > **My Profile**.
23-
3. Select [**API Tokens**](https://dash.cloudflare.com/profile/api-tokens) > **Create Token**.
24-
4. You can go to **Edit Cloudflare Workers** template > **Use template** or go to **Create Custom Token** > **Get started**. If you create a custom token, you will need to make sure to add the **Cloudflare Pages** permission with **Edit** access.
21+
1. <DashButton url="/?to=/:account/api-tokens" />
22+
2. Select **Create Token**.
23+
3. You can go to **Edit Cloudflare Workers** template > **Use template** or go to **Create Custom Token** > **Get started**. If you create a custom token, you will need to make sure to add the **Cloudflare Pages** permission with **Edit** access.
2524

2625
### Make requests
2726

src/content/docs/pages/configuration/build-configuration.mdx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ banner:
99
id: pages-migrate-to-workers
1010
---
1111

12-
import { Details, PagesBuildPresetsTable } from "~/components";
12+
import { Details, PagesBuildPresetsTable, DashButton } from "~/components";
1313

1414
You may tell Cloudflare Pages how your site needs to be built as well as where its output files will be located.
1515

@@ -41,10 +41,9 @@ If you are not using a preset, use `exit 0` as your **Build command**.
4141

4242
If your project makes use of environment variables to build your site, you can provide custom environment variables:
4343

44-
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com) and select your account.
45-
2. In **Account Home**, select **Workers & Pages**.
46-
3. In **Overview**, select your Pages project.
47-
4. Select **Settings** > **Environment variables**.
44+
1. <DashButton url="/?to=/:account/workers-and-pages" />
45+
2. Select your Pages project.
46+
3. Select **Settings** > **Environment variables**.
4847

4948
The following system environment variables are injected by default (but can be overridden):
5049

src/content/docs/pages/configuration/build-image.mdx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import {
1313
PagesBuildEnvironment,
1414
PagesBuildEnvironmentLanguages,
1515
PagesBuildEnvironmentTools,
16+
DashButton,
1617
} from "~/components";
1718

1819
Cloudflare Pages' build environment has broad support for a variety of languages, such as Ruby, Node.js, Python, PHP, and Go.
@@ -86,9 +87,9 @@ The v3 build system updates the default tools, libraries and languages to their
8687

8788
To migrate to this new version, configure your Pages project settings in the dashboard:
8889

89-
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com) and select your account.
90-
2. Select **Workers & Pages** > in **Overview**, select your Pages project.
91-
3. Go to **Settings** > **Build & deployments** > **Build system version** and select the latest version.
90+
1. <DashButton url="/?to=/:account/workers-and-pages" />
91+
2. Select your Pages project.
92+
3. Go to **Deployments** > **All deployments** > and select the latest version.
9293

9394
If you were previously relying on the default versions of any languages or tools in the build system, your build may fail when migrating to v3. To fix this, you must specify the version you wish to use by [overriding](/pages/configuration/build-image/#overriding-default-versions) the default versions.
9495

src/content/docs/pages/configuration/custom-domains.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ banner:
88
id: pages-migrate-to-workers
99
---
1010

11-
import { Render } from "~/components";
11+
import { Render, DashButton } from "~/components";
1212

1313
When deploying your Pages project, you may wish to point custom domains (or subdomains) to your site.
1414

@@ -62,9 +62,9 @@ Then, in **DNS** > **Records**:
6262
2. Select **Edit**.
6363
3. Select **Delete**.
6464

65-
Next, in Account Home, go to **Workers & Pages**:
65+
Next, <DashButton url="/?to=/:account/workers-and-pages" />
6666

67-
1. In **Overview**, select your Pages project.
67+
1. Select your Pages project.
6868
2. Go to **Custom domains**.
6969
3. Select the **three dot icon** next to your custom domain > **Remove domain**.
7070

src/content/docs/pages/configuration/debugging-pages.mdx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,17 @@ banner:
88
id: pages-migrate-to-workers
99
---
1010

11+
import { DashButton } from "~/components";
12+
1113
When setting up your Pages project, you may encounter various errors that prevent you from successfully deploying your site. This guide gives an overview of some common errors and solutions.
1214

1315
## Check your build log
1416

1517
You can review build errors in your Pages build log. To access your build log:
1618

17-
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com).
18-
2. In **Account Home**, go to **Workers & Pages**.
19-
3. In **Overview**, select your Pages project > **View build**.
19+
1. <DashButton url="/?to=/:account/workers-and-pages" />
20+
2. Select your Pages project.
21+
3. Go to **Deployments** > **View details** > **Build log**.
2022

2123
![After logging in to the Cloudflare dashboard, access the build log by following the instructions above](~/assets/images/pages/platform/pages-build-log.png)
2224

src/content/docs/pages/configuration/deploy-hooks.mdx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ banner:
88
id: pages-migrate-to-workers
99
---
1010

11+
import { DashButton } from "~/components";
12+
1113
With Deploy Hooks, you can trigger deployments using event sources beyond commits in your source repository. Each event source may obtain its own unique URL, which will receive HTTP POST requests in order to initiate new deployments. This feature allows you to integrate Pages with new or existing workflows. For example, you may:
1214

1315
- Automatically deploy new builds whenever content in a Headless CMS changes
@@ -16,10 +18,9 @@ With Deploy Hooks, you can trigger deployments using event sources beyond commit
1618

1719
To create a Deploy Hook:
1820

19-
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com) and select your account.
20-
2. In Account Home, select **Workers & Pages**.
21-
3. In **Overview**, select your Pages project.
22-
4. Go to **Settings** > **Builds & deployments** and select **Add deploy hook** to start configuration.
21+
1. <DashButton url="/?to=/:account/workers-and-pages" />
22+
2. Select your Pages project.
23+
3. Go to **Settings** > **Builds** and select **Add deploy hook** to start configuration.
2324

2425
![Add a deploy hook on the Cloudflare dashboard](~/assets/images/pages/platform/deploy-hooks-add.png)
2526

src/content/docs/pages/configuration/preview-deployments.mdx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,12 @@ banner:
88
id: pages-migrate-to-workers
99
---
1010

11+
import { DashButton } from "~/components";
12+
1113
Preview deployments allow you to preview new versions of your project without deploying it to production. To view preview deployments:
1214

13-
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/login) and select your account.
14-
2. In **Account Home**, select **Workers & Pages**.
15-
3. Select your project and find the deployment you would like to view.
15+
1. <DashButton url="/?to=/:account/workers-and-pages" />
16+
2. Select your project and find the deployment you would like to view.
1617

1718
Every time you open a new pull request on your GitHub repository, Cloudflare Pages will create a unique preview URL, which will stay updated as you continue to push new commits to the branch. This is only true when pull requests originate from the repository itself.
1819

@@ -44,10 +45,9 @@ By default, preview deployments are enabled and available publicly. In your proj
4445

4546
To protect your preview deployments behind Cloudflare Access:
4647

47-
1. Log in to [Cloudflare dashboard](https://dash.cloudflare.com/login).
48-
2. In Account Home, select **Workers & Pages**.
49-
3. In **Overview**, select your Pages project.
50-
4. Go to **Settings** > **General** > and select **Enable access policy**.
48+
1. <DashButton url="/?to=/:account/workers-and-pages" />
49+
2. Select your Pages project.
50+
3. Go to **Settings** > **General** > and select **Enable access policy**.
5151

5252
Note that this will only protect your preview deployments (for example, `373f31e2.user-example.pages.dev` and every other randomly generated preview link) and not your `*.pages.dev` domain or custom domain.
5353

src/content/docs/pages/framework-guides/deploy-a-react-site.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ banner:
88
id: pages-migrate-to-workers
99
---
1010

11-
import { PagesBuildPreset, Render, PackageManagers } from "~/components";
11+
import { PagesBuildPreset, Render, PackageManagers, DashButton } from "~/components";
1212

1313
[React](https://reactjs.org/) is a popular framework for building reactive and powerful front-end applications, built by the open-source team at Facebook.
1414

@@ -53,8 +53,8 @@ npm run dev
5353

5454
### Deploy via the Cloudflare dashboard
5555

56-
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/) and select your account.
57-
2. In Account Home, select **Workers & Pages** > **Create application** > **Pages** > **Connect to Git**.
56+
1. <DashButton url="/?to=/:account/workers-and-pages" />
57+
2. Select **Create application** > **Pages** > **Import an existing Git repository**.
5858
3. Select the new GitHub repository that you created and, in the **Set up builds and deployments** section, provide the following information:
5959

6060
<div>

src/content/docs/pages/framework-guides/deploy-a-vite3-project.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ banner:
88
id: pages-migrate-to-workers
99
---
1010

11-
import { Render, PackageManagers } from "~/components";
11+
import { Render, PackageManagers, DashButton } from "~/components";
1212

1313
[Vite](https://vitejs.dev) is a next-generation build tool for front-end developers. With [the release of Vite 3](https://vitejs.dev/blog/announcing-vite3.html), developers can make use of new command line (CLI) improvements, starter templates, and [more](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md#300-2022-07-13) to help build their front-end applications.
1414

@@ -67,8 +67,8 @@ git push
6767

6868
To deploy your site to Pages:
6969

70-
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/) and select your account.
71-
2. In Account Home, select **Workers & Pages** > **Create application** > **Pages** > **Connect to Git**.
70+
1. <DashButton url="/?to=/:account/workers-and-pages" />
71+
2. Select **Create application** > **Pages** > **Import from an existing Git repository**.
7272
3. Select your new GitHub repository.
7373
4. In the **Set up builds and deployments**, set `npm run build` as the **Build command**, and `dist` as the **Build output directory**.
7474

0 commit comments

Comments
 (0)