Skip to content

Commit 9c9279a

Browse files
committed
[Workers] Nav changes - batch 2
1 parent 66a287d commit 9c9279a

File tree

18 files changed

+164
-106
lines changed

18 files changed

+164
-106
lines changed

src/content/docs/workers/ci-cd/builds/configuration.mdx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ sidebar:
66
order: 2
77
---
88

9-
import { DirectoryListing, Render, Tabs, TabItem } from "~/components";
9+
import { DirectoryListing, Render, Tabs, TabItem, DashButton } from "~/components";
1010

1111
When connecting your Git repository to your Worker, you can customize the configurations needed to build and deploy your Worker.
1212

@@ -89,10 +89,12 @@ You can provide custom environment variables to your build.
8989

9090
To add environment variables via the dashboard:
9191

92-
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com) and select your account.
93-
2. In **Account Home**, select **Workers & Pages**.
94-
3. In **Overview**, select your Worker.
95-
4. Select **Settings** > **Environment variables**.
92+
1. In the Cloudflare dashboard, go to the **Workers & Pages** page.
93+
94+
<DashButton url="/?to=/:account/workers-and-pages" />
95+
96+
2. In **Overview**, select your Worker.
97+
3. Select **Settings** > **Environment variables**.
9698
</TabItem>
9799
<TabItem label="Wrangler">
98100
To add env variables using Wrangler, define text and JSON via the `[vars]` configuration in your Wrangler file.

src/content/docs/workers/ci-cd/external-cicd/github-actions.mdx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ pcx_content_type: how-to
33
title: GitHub Actions
44
description: Integrate Workers development into your existing GitHub Actions workflows.
55
---
6+
import { DashButton } from "~/components";
67

78
You can deploy Workers with [GitHub Actions](https://github.com/marketplace/actions/deploy-to-cloudflare-workers-with-wrangler). Here is how you can set up your GitHub Actions workflow.
89

@@ -17,12 +18,13 @@ To find your Cloudflare account ID, refer to [Find account and zone IDs](/fundam
1718
### API token
1819

1920
To create an API token to authenticate Wrangler in your CI job:
21+
1. In the Cloudflare dashboard, go to the **Account API tokens** page.
2022

21-
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com).
22-
2. Select **Manage Account** > **Account API Tokens**.
23-
3. Select **Create Token** > find **Edit Cloudflare Workers** > select **Use Template**.
24-
4. Customize your token name.
25-
5. Scope your token.
23+
<DashButton url="/?to=/:account/api-tokens" />
24+
25+
2. Select **Create Token** > find **Edit Cloudflare Workers** > select **Use Template**.
26+
3. Customize your token name.
27+
4. Scope your token.
2628

2729
You will need to choose the account and zone resources that the generated API token will have access to. We recommend scoping these down as much as possible to limit the access of your token. For example, if you have access to three different Cloudflare accounts, you should restrict the generated API token to only the account on which you will be deploying a Worker.
2830

src/content/docs/workers/configuration/cron-triggers.mdx

Lines changed: 26 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ head: []
55
description: Enable your Worker to be executed on a schedule.
66
---
77

8-
import { Render, WranglerConfig, TabItem, Tabs } from "~/components";
8+
import { Render, WranglerConfig, TabItem, Tabs, DashButton } from "~/components";
99

1010
## Background
1111

@@ -113,9 +113,11 @@ crons = ["0 * * * *"]
113113

114114
To add Cron Triggers in the Cloudflare dashboard:
115115

116-
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com) and select your account.
117-
2. In Account Home, select **Workers & Pages**.
118-
3. In **Overview**, select your Worker > **Settings** > **Triggers** > **Cron Triggers**.
116+
1. In the Cloudflare dashboard, go to the **Workers & Pages** page.
117+
118+
<DashButton url="/?to=/:account/workers-and-pages" />
119+
120+
2. In **Overview**, select your Worker > **Settings** > **Triggers** > **Cron Triggers**.
119121

120122
## Supported cron expressions
121123

@@ -195,11 +197,13 @@ curl "http://localhost:8787/cdn-cgi/handler/scheduled?cron=*+*+*+*+*&time=174585
195197

196198
To view the execution history of Cron Triggers, view **Cron Events**:
197199

198-
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com) and select your account.
199-
2. In Account Home, go to **Workers & Pages**.
200-
3. In **Overview**, select your **Worker**.
201-
4. Select **Settings**.
202-
5. Under **Trigger Events**, select **View events**.
200+
1. In the Cloudflare dashboard, go to the **Workers & Pages** page.
201+
202+
<DashButton url="/?to=/:account/workers-and-pages" />
203+
204+
2. In **Overview**, select your **Worker**.
205+
3. Select **Settings**.
206+
4. Under **Trigger Events**, select **View events**.
203207

204208
Cron Events stores the 100 most recent invocations of the Cron scheduled event. [Workers Logs](/workers/observability/logs/workers-logs) also records invocation logs for the Cron Trigger with a longer retention period and a filter & query interface. If you are interested in an API to access Cron Events, use Cloudflare's [GraphQL Analytics API](/analytics/graphql-api).
205209

@@ -217,8 +221,11 @@ Refer to [Metrics and Analytics](/workers/observability/metrics-and-analytics/)
217221

218222
To delete a Cron Trigger on a deployed Worker via the dashboard:
219223

220-
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com) and select your account.
221-
2. Go to **Workers & Pages**, and select your Worker.
224+
1. In the Cloudflare dashboard, go to the **Workers & Pages** page.
225+
226+
<DashButton url="/?to=/:account/workers-and-pages" />
227+
228+
2. Select your Worker.
222229
3. Go to **Triggers** > select the three dot icon next to the Cron Trigger you want to remove > **Delete**.
223230

224231
#### Via the [Wrangler configuration file](/workers/wrangler/configuration/)
@@ -252,12 +259,14 @@ Renewable energy can be purchased in a number of ways, including through on-site
252259

253260
Green Compute can be configured at the account level:
254261

255-
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com) and select your account.
256-
2. In Account Home, select **Workers & Pages**.
257-
3. In the **Account details** section, find **Compute Setting**.
258-
4. Select **Change**.
259-
5. Select **Green Compute**.
260-
6. Select **Confirm**.
262+
1. In the Cloudflare dashboard, go to the **Workers & Pages** page.
263+
264+
<DashButton url="/?to=/:account/workers-and-pages" />
265+
266+
2. In the **Account details** section, find **Compute Setting**.
267+
3. Select **Change**.
268+
4. Select **Green Compute**.
269+
5. Select **Confirm**.
261270

262271
## Related resources
263272

src/content/docs/workers/configuration/environment-variables.mdx

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ head: []
55
description: You can add environment variables, which are a type of binding, to attach text strings or JSON values to your Worker.
66
---
77

8-
import { Render, TabItem, Tabs, WranglerConfig } from "~/components";
8+
import { Render, TabItem, Tabs, WranglerConfig, DashButton } from "~/components";
99

1010
## Background
1111

@@ -79,15 +79,16 @@ Learn about [environments in Wrangler](/workers/wrangler/environments).
7979
## Add environment variables via the dashboard
8080

8181
To add environment variables via the dashboard:
82+
1. In the Cloudflare dashboard, go to the **Workers & Pages** page.
8283

83-
1. Log in to [Cloudflare dashboard](https://dash.cloudflare.com/) and select your account.
84-
2. Select **Workers & Pages**.
85-
3. In **Overview**, select your Worker.
86-
4. Select **Settings**.
87-
5. Under **Variables and Secrets**, select **Add**.
88-
6. Select a **Type**, input a **Variable name**, and input its **Value**. This variable will be made available to your Worker.
89-
7. (Optional) To add multiple environment variables, select **Add variable**.
90-
8. Select **Deploy** to implement your changes.
84+
<DashButton url="/?to=/:account/workers-and-pages" />
85+
86+
2. In **Overview**, select your Worker.
87+
3. Select **Settings**.
88+
4. Under **Variables and Secrets**, select **Add**.
89+
5. Select a **Type**, input a **Variable name**, and input its **Value**. This variable will be made available to your Worker.
90+
6. (Optional) To add multiple environment variables, select **Add variable**.
91+
7. Select **Deploy** to implement your changes.
9192

9293
:::caution[Plaintext strings and secrets]
9394
Select the **Secret** type if your environment variable is a [secret](/workers/configuration/secrets/). Alternatively, consider [Cloudflare Secrets Store](/secrets-store/), for account-level secrets.

src/content/docs/workers/configuration/routing/custom-domains.mdx

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Custom Domains
44

55
---
66

7-
import { WranglerConfig } from "~/components";
7+
import { WranglerConfig, DashButton } from "~/components";
88

99
## Background
1010

@@ -27,7 +27,7 @@ To add a Custom Domain, you must have:
2727
1. An [active Cloudflare zone](/dns/zone-setups/).
2828
2. A Worker to invoke.
2929

30-
Custom Domains can be attached to your Worker via the [Cloudflare dashboard](/workers/configuration/routing/custom-domains/#set-up-a-custom-domain-in-the-dashboard), [Wrangler](/workers/configuration/routing/custom-domains/#set-up-a-custom-domain-in-your-wrangler-configuration-file) or the [API](/api/resources/workers/subresources/domains/methods/list/).
30+
Custom Domains can be attached to your Worker via the Cloudflare dashboard, [Wrangler](/workers/configuration/routing/custom-domains/#set-up-a-custom-domain-in-your-wrangler-configuration-file) or the [API](/api/resources/workers/subresources/domains/methods/list/).
3131

3232
:::caution
3333

@@ -41,8 +41,11 @@ You cannot create a Custom Domain on a hostname with an existing CNAME DNS recor
4141

4242
To set up a Custom Domain in the dashboard:
4343

44-
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com) and select your account.
45-
2. Select **Workers & Pages** and in **Overview**, select your Worker.
44+
1. In the Cloudflare dashboard, go to the **Workers & Pages** page.
45+
46+
<DashButton url="/?to=/:account/workers-and-pages" />
47+
48+
2. In **Overview**, select your Worker.
4649
3. Go to **Settings** > **Domains & Routes** > **Add** > **Custom Domain**.
4750
4. Enter the domain you want to configure for your Worker.
4851
5. Select **Add Custom Domain**.
@@ -149,21 +152,28 @@ If you are currently invoking a Worker using a [route](/workers/configuration/ro
149152
### Migrate from Routes via the dashboard
150153

151154
To migrate the route `example.com/*`:
155+
1. In the Cloudflare dashboard, go to the **Account home** page.
156+
157+
<DashButton url="/?to=/:account/home" />
152158

153-
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com) and select your account.
154-
2. Go to **DNS** and delete the CNAME record for `example.com`.
155-
3. Go to **Account Home** > **Workers & Pages**.
156-
4. In **Overview**, select your Worker > **Settings** > **Domains & Routes**.
157-
5. Select **Add** > **Custom domain** and add `example.com`.
158-
6. Delete the route `example.com/*` located in your Worker > **Settings** > **Domains & Routes**.
159+
2. Select your domain.
160+
3. Go to **DNS** and delete the CNAME record for `example.com`.
161+
4. Go to **Account Home** > **Workers & Pages**.
162+
5. In **Overview**, select your Worker > **Settings** > **Domains & Routes**.
163+
6. Select **Add** > **Custom domain** and add `example.com`.
164+
7. Delete the route `example.com/*` located in your Worker > **Settings** > **Domains & Routes**.
159165

160166
### Migrate from Routes via Wrangler
161167

162168
To migrate the route `example.com/*` in your [Wrangler configuration file](/workers/wrangler/configuration/):
163169

164-
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com) and select your account.
165-
2. Go to **DNS** and delete the CNAME record for `example.com`.
166-
3. Add the following to your Wrangler file:
170+
1. In the Cloudflare dashboard, go to the **Account home** page.
171+
172+
<DashButton url="/?to=/:account/home" />
173+
174+
2. Select your domain.
175+
3. Go to **DNS** and delete the CNAME record for `example.com`.
176+
4. Add the following to your Wrangler file:
167177

168178

169179

src/content/docs/workers/configuration/routing/routes.mdx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ pcx_content_type: concept
33
title: Routes
44
---
55

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

88
## Background
99

@@ -42,9 +42,11 @@ Routes can also be created via the API. Refer to the [Workers Routes API documen
4242
Before you set up a route, make sure you have a DNS record set up for the [domain](/dns/manage-dns-records/how-to/create-zone-apex/) or [subdomain](/dns/manage-dns-records/how-to/create-subdomain/) you would like to route to.
4343

4444
To set up a route in the dashboard:
45+
1. In the Cloudflare dashboard, go to the **Workers & Pages** page.
4546

46-
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com) and select your account.
47-
2. Go to **Workers & Pages** and in **Overview**, select your Worker.
47+
<DashButton url="/?to=/:account/workers-and-pages" />
48+
49+
2. In **Overview**, select your Worker.
4850
3. Go to **Settings** > **Domains & Routes** > **Add** > **Route**.
4951
4. Select the zone and enter the route pattern.
5052
5. Select **Add route**.
@@ -71,7 +73,7 @@ zone_id = "<YOUR_ZONE_ID>"
7173

7274
</WranglerConfig>
7375

74-
Add the `zone_name` or `zone_id` option after each route. The `zone_name` and `zone_id` options are interchangeable. If using `zone_id`, find your zone ID by logging in to the [Cloudflare dashboard](https://dash.cloudflare.com) > select your account > select your website > find the **Zone ID** in the lefthand side of **Overview**.
76+
Add the `zone_name` or `zone_id` option after each route. The `zone_name` and `zone_id` options are interchangeable. If using `zone_id`, find your zone ID by logging in to the Cloudflare dashboard > select your account > select your website > find the **Zone ID** in the left-hand side of **Overview**.
7577

7678
To add multiple routes:
7779

src/content/docs/workers/configuration/versions-and-deployments/gradual-deployments.mdx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ head: []
55
description: Incrementally deploy code changes to your Workers with gradual deployments.
66
---
77

8-
import { Example } from "~/components";
8+
import { Example, DashButton } from "~/components";
99

1010
Gradual Deployments give you the ability to incrementally deploy new [versions](/workers/configuration/versions-and-deployments/#versions) of Workers by splitting traffic across versions.
1111

@@ -19,7 +19,7 @@ Using gradual deployments, you can:
1919

2020
## Use gradual deployments
2121

22-
The following section guides you through an example usage of gradual deployments. You will choose to use either [Wrangler](/workers/configuration/versions-and-deployments/gradual-deployments/#via-wrangler) or the [Cloudflare dashboard](/workers/configuration/versions-and-deployments/gradual-deployments/#via-the-cloudflare-dashboard) to:
22+
The following section guides you through an example usage of gradual deployments. You will choose to use either [Wrangler](/workers/configuration/versions-and-deployments/gradual-deployments/#via-wrangler) or the Cloudflare dashboard to:
2323

2424
- Create a new Worker.
2525
- Publish a new version of that Worker without deploying it.
@@ -88,9 +88,11 @@ npx wrangler versions deploy
8888

8989
### Via the Cloudflare dashboard
9090

91-
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/?to=/:account/workers) and select your account.
92-
2. Go to **Workers & Pages**.
93-
3. Select **Create application** > **Hello World** template > deploy your Worker.
91+
1. In the Cloudflare dashboard, go to the **Workers & Pages** page.
92+
93+
<DashButton url="/?to=/:account/workers-and-pages" />
94+
95+
2. Select **Create application** > **Hello World** template > deploy your Worker.
9496
4. Once the Worker is deployed, go to the online code editor through **Edit code**. Edit the Worker code (change the `Response` content) and upload the Worker.
9597
5. To save changes, select the **down arrow** next to **Deploy** > **Save**. This will create a new version of your Worker.
9698
6. Create a new deployment that splits traffic between the two versions created in step 3 and 5 by going to **Deployments** and selecting **Deploy Version**.
@@ -157,7 +159,7 @@ curl -s https://example.com -H 'Cloudflare-Workers-Version-Overrides: my-worker-
157159

158160
The dictionary can contain multiple key-value pairs. Each key indicates the name of the Worker the override should be applied to. The value indicates the version ID that should be used and must be a [String](https://www.rfc-editor.org/rfc/rfc8941#name-strings).
159161

160-
A version override will only be applied if the specified version is in the current deployment. The versions in the current deployment can be found using the [`wrangler deployments list`](/workers/wrangler/commands/#list-5) command or on the [Workers Dashboard](https://dash.cloudflare.com/?to=/:account/workers) under Worker > Deployments > Active Deployment.
162+
A version override will only be applied if the specified version is in the current deployment. The versions in the current deployment can be found using the [`wrangler deployments list`](/workers/wrangler/commands/#list-5) command or on the **Workers & Pages** page of the Cloudflare dashboard > Select your Workers > Deployments > Active Deployment.
161163

162164
:::note[Verifying that the version override was applied]
163165

src/content/docs/workers/configuration/versions-and-deployments/index.mdx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ title: Versions & Deployments
44
head: []
55
description: Upload versions of Workers and create deployments to release new versions.
66
---
7+
import { DashButton } from "~/components";
78

89
Versions track changes to your Worker. Deployments configure how those changes are deployed to your traffic.
910

@@ -83,9 +84,11 @@ Wrangler allows you to view the 10 most recent versions and deployments. Refer t
8384

8485
To view your deployments in the Cloudflare dashboard:
8586

86-
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/?to=/:account/workers) and select your account.
87-
2. Go to **Workers & Pages**.
88-
3. Select your Worker > **Deployments**.
87+
1. In the Cloudflare dashboard, go to the **Workers & Pages** page.
88+
89+
<DashButton url="/?to=/:account/workers-and-pages" />
90+
91+
2. Select your Worker > **Deployments**.
8992

9093
## Limits
9194

src/content/docs/workers/examples/103-early-hints.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ sidebar:
1313
order: 1001
1414
description: Allow a client to request static assets while waiting for the HTML response.
1515
---
16+
import { DashButton } from "~/components";
1617

1718
If you want to get started quickly, click on the button below.
1819

@@ -26,7 +27,10 @@ import { TabItem, Tabs } from "~/components";
2627

2728
To ensure Early Hints are enabled on your zone:
2829

29-
1. Log in to the [Cloudflare Dashboard](https://dash.cloudflare.com) and select your account and website.
30+
1. In the Cloudflare dashboard, go to the **Account home** page.
31+
32+
<DashButton url="/?to=/:account/home" />
33+
3034
2. Go to **Speed** > **Optimization** > **Content Optimization**.
3135
3. Enable the **Early Hints** toggle to on.
3236

src/content/docs/workers/examples/images-workers.mdx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ sidebar:
1313
description: Set up custom domain for Images using a Worker or serve images
1414
using a prefix path and Cloudflare registered domain.
1515
---
16+
import { DashButton } from "~/components";
1617

1718
If you want to get started quickly, click on the button below.
1819

@@ -23,10 +24,11 @@ This creates a repository in your GitHub account and deploys the application to
2324
import { TabItem, Tabs } from "~/components";
2425

2526
To serve images from a custom domain:
27+
1. In the Cloudflare dashboard, go to the **Workers & Pages** page.
2628

27-
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com).
28-
2. Select your account > select **Workers & Pages**.
29-
3. Select **Create application** > **Workers** > **Create Worker** and create your Worker.
29+
<DashButton url="/?to=/:account/workers-and-pages" />
30+
31+
2. Select **Create application** > **Workers** > **Create Worker** and create your Worker.
3032
4. In your Worker, select **Quick edit** and paste the following code.
3133

3234
<Tabs syncKey="workersExamples"> <TabItem label="JavaScript" icon="seti:javascript">

0 commit comments

Comments
 (0)