Skip to content

Commit 4e649c6

Browse files
authored
[Pages] Adding DashButton for Zone-level directions (#25229)
1 parent 0bb6ffc commit 4e649c6

File tree

8 files changed

+80
-28
lines changed

8 files changed

+80
-28
lines changed

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

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ pcx_content_type: concept
33
title: Build caching
44
---
55

6+
import { DashButton, Steps } from "~/components";
7+
68
Improve Pages build times by caching dependencies and build output between builds with a project-wide shared cache.
79

810
The first build to occur after enabling build caching on your Pages project will save to cache. Every subsequent build will restore from cache unless configured otherwise.
@@ -52,16 +54,26 @@ The following limits are imposed for build caching:
5254

5355
To enable build caching :
5456

55-
1. Navigate to [Workers & Pages Overview](https://dash.cloudflare.com) on the Dashboard.
57+
<Steps>
58+
1. Go to the **Workers & Pages** in the Cloudflare dashboard.
59+
60+
<DashButton url="/?to=/:account/workers-and-pages" />
61+
5662
2. Find your Pages project.
5763
3. Go to **Settings** > **Build** > **Build cache**.
5864
4. Select **Enable** to turn on build caching.
65+
</Steps>
5966

6067
## Clear build cache
6168

6269
The build cache can be cleared for a project if needed, such as when debugging build issues. To clear the build cache:
6370

64-
1. Navigate to [Workers & Pages Overview](https://dash.cloudflare.com) on the Dashboard.
71+
<Steps>
72+
1. Go to the **Workers & Pages** in the Cloudflare dashboard.
73+
74+
<DashButton url="/?to=/:account/workers-and-pages" />
75+
6576
2. Find your Pages project.
6677
3. Go to **Settings** > **Build** > **Build cache**.
6778
4. Select **Clear Cache** to clear the build cache.
79+
</Steps>

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

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,22 @@ pcx_content_type: concept
33
title: Build watch paths
44
---
55

6+
import { DashButton, Steps } from "~/components";
7+
68
When you connect a git repository to Pages, by default a change to any file in the repository will trigger a Pages build. You can configure Pages to include or exclude specific paths to specify if Pages should skip a build for a given path. This can be especially helpful if you are using a monorepo project structure and want to limit the amount of builds being kicked off.
79

810
## Configure paths
911

1012
To configure which paths are included and excluded:
1113

12-
1. In **Overview**, select your Pages project.
13-
2. Go to **Settings** > **Build** > **Build watch paths**. Pages will default to setting your project’s includes paths to everything (\[\*]) and excludes paths to nothing (`[]`).
14+
<Steps>
15+
1. Go to the **Workers & Pages** in the Cloudflare dashboard.
16+
17+
<DashButton url="/?to=/:account/workers-and-pages" />
18+
19+
2. Find your Pages project.
20+
3. Go to **Settings** > **Build** > **Build watch paths**. Pages will default to setting your project's includes paths to everything (\[\*]) and excludes paths to nothing (`[]`).
21+
</Steps>
1422

1523
The configuration fields can be filled in two ways:
1624

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

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ pcx_content_type: how-to
33
title: Custom domains
44
---
55

6-
import { Render, DashButton } from "~/components";
6+
import { Render, DashButton, Steps } from "~/components";
77

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

@@ -49,31 +49,35 @@ To ensure a custom domain is added successfully, you must go through the [Add a
4949

5050
To detach a custom domain from your Pages project, you must modify your zone's DNS records.
5151

52-
First, log in to the Cloudflare dashboard > select your account in **Account Home** > select your website > **DNS**.
52+
<Steps>
53+
1. Go to the **DNS Records** page for your website in the Cloudflare dashboard.
5354

54-
Then, in **DNS** > **Records**:
55+
<DashButton url="/?to=/:account/:zone/dns/records" />
5556

56-
1. Locate your Pages project's CNAME record.
57-
2. Select **Edit**.
58-
3. Select **Delete**.
57+
2. Locate your Pages project's CNAME record.
58+
3. Select **Edit**.
59+
4. Select **Delete**.
5960

60-
Next, in the Cloudflare dashboard, go to the **Workers & Pages** page.
61+
5. In the Cloudflare dashboard, go to the **Workers & Pages** page.
6162

62-
<DashButton url="/?to=/:account/workers-and-pages" />
63+
<DashButton url="/?to=/:account/workers-and-pages" />
6364

64-
1. Select your Pages project.
65-
2. Go to **Custom domains**.
66-
3. Select the **three dot icon** next to your custom domain > **Remove domain**.
65+
6. Select your Pages project.
66+
7. Go to **Custom domains**.
67+
8. Select the **three dot icon** next to your custom domain > **Remove domain**.
68+
</Steps>
6769

6870
After completing these steps, your Pages project will only be accessible through the `*.pages.dev` subdomain you chose when creating your project.
6971

7072
## Disable access to `*.pages.dev` subdomain
7173

7274
To disable access to your project's provided `*.pages.dev` subdomain:
7375

76+
<Steps>
7477
1. Use Cloudflare Access over your previews (`*.{project}.pages.dev`). Refer to [Customize preview deployments access](/pages/configuration/preview-deployments/#customize-preview-deployments-access).
7578

7679
2. Redirect the `*.pages.dev` URL associated with your production Pages project to a custom domain. You can use the account-level [Bulk Redirect](/rules/url-forwarding/bulk-redirects/) feature to redirect your `*.pages.dev` URL to a custom domain.
80+
</Steps>
7781

7882
## Caching
7983

src/content/docs/pages/configuration/git-integration/index.mdx

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ pcx_content_type: concept
33
title: Git integration
44
---
55

6+
import { Steps, DashButton } from "~/components";
7+
68
You can connect each Cloudflare Pages project to a [GitHub](/pages/configuration/git-integration/github-integration) or [GitLab](/pages/configuration/git-integration/gitlab-integration) repository, and Cloudflare will automatically deploy your code every time you push a change to a branch.
79

810
:::note
@@ -50,8 +52,14 @@ This can be useful for managing repository access or troubleshooting installatio
5052

5153
If you are using a Git-integrated project and do not want to trigger deployments every time you push a commit, you can use [branch control](/pages/configuration/branch-build-controls/) to disable/pause builds:
5254

53-
1. Go to the **Settings** of your **Pages project** in the [Cloudflare dashboard](https://dash.cloudflare.com).
54-
2. Navigate to **Build** > edit **Branch control** > turn off **Enable automatic production branch deployments**.
55-
3. You can also change your Preview branch to **None (Disable automatic branch deployments)** to pause automatic preview deployments.
55+
<Steps>
56+
1. Go to **Workers & Pages** in the Cloudflare dashboard.
57+
58+
<DashButton url="/?to=/:account/workers-and-pages" />
59+
60+
2. Select your Pages project.
61+
3. Navigate to **Build** > edit **Branch control** > turn off **Enable automatic production branch deployments**.
62+
4. You can also change your Preview branch to **None (Disable automatic branch deployments)** to pause automatic preview deployments.
63+
</Steps>
5664

5765
Then, you can use Wrangler to deploy directly to your Pages project and make changes to your Git repository without automatically triggering a build.

src/content/docs/pages/functions/bindings.mdx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -437,12 +437,13 @@ When developing locally using Wrangler, you can define an AI binding using the `
437437

438438
To configure a Workers AI binding via the Cloudflare dashboard:
439439

440-
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com) and select your account.
441-
2. In **Account Home**, select **Workers & Pages**.
442-
3. Select your Pages project > **Settings**.
443-
4. Select your Pages environment > **Bindings** > **Add** > **Workers AI**.
444-
5. Give your binding a name under **Variable name**.
445-
6. Redeploy your project for the binding to take effect.
440+
1. Go to the **Workers & Pages** page.
441+
442+
<DashButton url="/?to=/:account/workers-and-pages" />
443+
2. Select your Pages project > **Settings**.
444+
3. Select your Pages environment > **Bindings** > **Add** > **Workers AI**.
445+
4. Give your binding a name under **Variable name**.
446+
5. Redeploy your project for the binding to take effect.
446447

447448
### Use Workers AI bindings
448449

src/content/docs/pages/how-to/npm-private-registry.mdx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ title: Install private packages
44

55
---
66

7+
import { Steps, DashButton } from "~/components";
8+
79
Cloudflare Pages supports custom package registries, allowing you to include private dependencies in your application. While this walkthrough focuses specifically on [npm](https://www.npmjs.com/), the Node package manager and registry, the same approach can be applied to other registry tools.
810

911
You will be be adjusting the [environment variables](/pages/configuration/build-configuration/#environment-variables) in your Pages project's **Settings**. An existing website can be modified at any time, but new projects can be initialized with these settings, too. Either way, altering the project settings will not be reflected until its next deployment.
@@ -70,8 +72,13 @@ Your Pages project must then have the matching [environment variables](/pages/co
7072

7173
In the event that your local development no longer works with your new `.npmrc` file, you will need to add some additional changes:
7274

75+
<Steps>
7376
1. Rename the Pages-compliant `.npmrc` file to `.npmrc.pages`. This should be referencing environment variables.
74-
7577
2. Restore your previous `.npmrc` file – the version that was previously working for you and your teammates.
78+
3. Go to **Workers & Pages** in the Cloudflare dashboard.
79+
80+
<DashButton url="/?to=/:account/workers-and-pages" />
7681

77-
3. Go to your Pages project > **Settings** > **Environment variables**, add a new [environment variable](/pages/configuration/build-configuration/#environment-variables) named [`NPM_CONFIG_USERCONFIG`](https://docs.npmjs.com/cli/v6/using-npm/config#npmrc-files) and set its value to `/opt/buildhome/repo/.npmrc.pages`. If your `.npmrc.pages` file is not in your project's root directory, adjust this path accordingly.
82+
4. Select your Pages project.
83+
5. Go to **Settings** > **Environment variables**, add a new [environment variable](/pages/configuration/build-configuration/#environment-variables) named [`NPM_CONFIG_USERCONFIG`](https://docs.npmjs.com/cli/v6/using-npm/config#npmrc-files) and set its value to `/opt/buildhome/repo/.npmrc.pages`. If your `.npmrc.pages` file is not in your project's root directory, adjust this path accordingly.
84+
</Steps>

src/content/docs/pages/how-to/use-direct-upload-with-continuous-integration.mdx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,13 @@ Now that you have created your API token, you can use it to push your project fr
3838

3939
### Get project account ID
4040

41-
To find your account ID, log in to the Cloudflare dashboard > select your zone in **Account Home** > find your account ID in **Overview** under **API** on the right-side menu. If you have not added a zone, add one by selecting **Add** > **Connect a domain**. You can purchase a domain from [Cloudflare's registrar](/registrar/).
41+
To find your account ID, go to the **Zone Overview** page in the Cloudflare dashboard.
42+
43+
<DashButton url="/?to=/:account/:zone/" />
44+
45+
Find your account ID in the **API** section on the right-hand side menu.
46+
47+
If you have not added a zone, add one by selecting **Add** > **Connect a domain**. You can purchase a domain from [Cloudflare's registrar](/registrar/).
4248

4349
## Use GitHub Actions
4450

src/content/docs/pages/migrations/migrating-from-netlify/index.mdx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ sidebar:
1010

1111
---
1212

13+
import { DashButton } from "~/components";
14+
1315
In this tutorial, you will learn how to migrate your Netlify application to Cloudflare Pages.
1416

1517
## Finding your build command and build directory
@@ -93,7 +95,11 @@ If you choose to use a custom domain for your Pages, you can set it to the same
9395

9496
## Cleaning up your old application and assigning the domain
9597

96-
In the Cloudflare dashboard, go to **DNS** > **Records** and review that you have updated the CNAME record for your domain from Netlify to Cloudflare Pages. With your DNS record updated, requests will go to your Pages application.
98+
In the Cloudflare dashboard, go to the **DNS Records** page.
99+
100+
<DashButton url="/?to=/:account/:zone/dns/records" />
101+
102+
Review that you have updated the CNAME record for your domain from Netlify to Cloudflare Pages. With your DNS record updated, requests will go to your Pages application.
97103

98104
In **DNS**, your record's **Content** should be your `<SUBDOMAIN>.pages.dev` subdomain.
99105

0 commit comments

Comments
 (0)