Skip to content

Commit 153173d

Browse files
coffee-mugfurrypet
authored andcommitted
Added Deploy to Cloudflare button to Cloudflare Workers examples (#21752)
* Added Deploy to Cloudflare button to Cloudflare Workers examples * Added explainer for D2CF button --------- Co-authored-by: Lucas Kostka <[email protected]>
1 parent 61482b9 commit 153173d

37 files changed

+222
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ sidebar:
1515
description: Allow a client to request static assets while waiting for the HTML response.
1616
---
1717

18+
If you want to get started quickly, click on the button below.
19+
20+
[![Deploy to Cloudflare](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=https://github.com/cloudflare/docs-examples/tree/main/workers/103-early-hints)
21+
22+
This creates a repository in your GitHub account and deploys the application to Cloudflare Workers.
23+
1824
import { TabItem, Tabs } from "~/components";
1925

2026
`103` Early Hints is an HTTP status code designed to speed up content delivery. When enabled, Cloudflare can cache the `Link` headers marked with preload and/or preconnect from HTML pages and serve them in a `103` Early Hints response before reaching the origin server. Browsers can use these hints to fetch linked assets while waiting for the origin’s final response, dramatically improving page load speeds.

src/content/docs/workers/examples/accessing-the-cloudflare-object.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ description: Access custom Cloudflare properties and control how Cloudflare
1616
features are applied to every request.
1717
---
1818

19+
If you want to get started quickly, click on the button below.
20+
21+
[![Deploy to Cloudflare](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=https://github.com/cloudflare/docs-examples/tree/main/workers/accessing-the-cloudflare-object)
22+
23+
This creates a repository in your GitHub account and deploys the application to Cloudflare Workers.
24+
1925
import { TabItem, Tabs } from "~/components";
2026

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

src/content/docs/workers/examples/aggregate-requests.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ description: Send two GET request to two urls and aggregates the responses into
1414
one response.
1515
---
1616

17+
If you want to get started quickly, click on the button below.
18+
19+
[![Deploy to Cloudflare](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=https://github.com/cloudflare/docs-examples/tree/main/workers/aggregate-requests)
20+
21+
This creates a repository in your GitHub account and deploys the application to Cloudflare Workers.
22+
1723
import { TabItem, Tabs } from "~/components";
1824

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

src/content/docs/workers/examples/alter-headers.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ description: Example of how to add, change, or delete headers sent in a request
1919
or returned in a response.
2020
---
2121

22+
If you want to get started quickly, click on the button below.
23+
24+
[![Deploy to Cloudflare](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=https://github.com/cloudflare/docs-examples/tree/main/workers/alter-headers)
25+
26+
This creates a repository in your GitHub account and deploys the application to Cloudflare Workers.
27+
2228
import { TabItem, Tabs } from "~/components";
2329

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

src/content/docs/workers/examples/cache-api.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ sidebar:
1515
description: Use the Cache API to store responses in Cloudflare's cache.
1616
---
1717

18+
If you want to get started quickly, click on the button below.
19+
20+
[![Deploy to Cloudflare](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=https://github.com/cloudflare/docs-examples/tree/main/workers/cache-api)
21+
22+
This creates a repository in your GitHub account and deploys the application to Cloudflare Workers.
23+
1824
import { TabItem, Tabs } from "~/components";
1925

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

src/content/docs/workers/examples/cache-post-request.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ sidebar:
1515
description: Cache POST requests using the Cache API.
1616
---
1717

18+
If you want to get started quickly, click on the button below.
19+
20+
[![Deploy to Cloudflare](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=https://github.com/cloudflare/docs-examples/tree/main/workers/cache-post-request)
21+
22+
This creates a repository in your GitHub account and deploys the application to Cloudflare Workers.
23+
1824
import { TabItem, Tabs } from "~/components";
1925

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

src/content/docs/workers/examples/cache-tags.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ sidebar:
1414
description: Send Additional Cache Tags using Workers
1515
---
1616

17+
If you want to get started quickly, click on the button below.
18+
19+
[![Deploy to Cloudflare](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=https://github.com/cloudflare/docs-examples/tree/main/workers/cache-tags)
20+
21+
This creates a repository in your GitHub account and deploys the application to Cloudflare Workers.
22+
1723
import { TabItem, Tabs } from "~/components";
1824

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

src/content/docs/workers/examples/cache-using-fetch.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ description: Determine how to cache a resource by setting TTLs, custom cache
1818
keys, and cache headers in a fetch request.
1919
---
2020

21+
If you want to get started quickly, click on the button below.
22+
23+
[![Deploy to Cloudflare](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=https://github.com/cloudflare/docs-examples/tree/main/workers/cache-using-fetch)
24+
25+
This creates a repository in your GitHub account and deploys the application to Cloudflare Workers.
26+
2127
import { TabItem, Tabs } from "~/components";
2228

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

src/content/docs/workers/examples/conditional-response.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ description: Return a response based on the incoming request's URL, HTTP method,
1616
User Agent, IP address, ASN or device type.
1717
---
1818

19+
If you want to get started quickly, click on the button below.
20+
21+
[![Deploy to Cloudflare](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=https://github.com/cloudflare/docs-examples/tree/main/workers/conditional-response)
22+
23+
This creates a repository in your GitHub account and deploys the application to Cloudflare Workers.
24+
1925
import { TabItem, Tabs } from "~/components";
2026

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

src/content/docs/workers/examples/cors-header-proxy.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ sidebar:
1616
description: Add the necessary CORS headers to a third party API response.
1717
---
1818

19+
If you want to get started quickly, click on the button below.
20+
21+
[![Deploy to Cloudflare](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=https://github.com/cloudflare/docs-examples/tree/main/workers/cors-header-proxy)
22+
23+
This creates a repository in your GitHub account and deploys the application to Cloudflare Workers.
24+
1925
import { TabItem, Tabs } from "~/components";
2026

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

0 commit comments

Comments
 (0)