Skip to content

Commit f7ee7d2

Browse files
author
Tanushree Sharma
committed
re-order
1 parent bbfd90e commit f7ee7d2

File tree

6 files changed

+76
-21
lines changed

6 files changed

+76
-21
lines changed

src/content/docs/workers/frameworks/get-started.mdx

Lines changed: 0 additions & 10 deletions
This file was deleted.

src/content/docs/workers/runtime-apis/index.mdx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@
22
pcx_content_type: navigation
33
title: Runtime APIs
44
sidebar:
5-
order: 7
6-
5+
order: 6
76
---
87

9-
import { DirectoryListing } from "~/components"
8+
import { DirectoryListing } from "~/components";
109

1110
The Workers runtime is designed to be [JavaScript standards compliant](https://ecma-international.org/publications-and-standards/standards/ecma-262/) and web-interoperable. Wherever possible, it uses web platform APIs, so that code can be reused across client and server, as well as across [WinterCG](https://wintercg.org/) JavaScript runtimes.
1211

src/content/docs/workers/configuration/assets/binding.mdx renamed to src/content/docs/workers/static-assets/binding.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ assets = { directory = "./public", binding = "ASSETS" }
5050
5151
**Response**
5252
53-
- `Promise<Response>` Returns a static static asset matching the given request.
53+
- `Promise<Response>` Returns a static asset matching the given request.
5454
5555
**Example**
5656

src/content/docs/workers/configuration/assets/index.mdx renamed to src/content/docs/workers/static-assets/get-started.mdx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
---
22
pcx_content_type: concept
3-
title: Assets
3+
title: Get Started
44
head: []
55
sidebar:
6-
order: 7
6+
order: 6
77
badge: Beta
8-
description: Use [Cloudflare Pages](/pages/) for hosting full-stack applications
9-
instead of Workers Sites. Do not use Workers Sites for new projects.
8+
description: Run frontend websites — static or dynamic — directly on Cloudflare's global network.
109
---
1110

1211
import {
@@ -17,7 +16,7 @@ import {
1716
PackageManagers,
1817
} from "~/components";
1918

20-
This guide will instruct you through setting up and deploying a static site or a full-stack application from scratch on Workers. You may prefer to build your website from scratch if:
19+
This guide will instruct you through setting up and deploying a static site or a full-stack application without a framework on Workers. You may prefer to build your website from scratch if:
2120

2221
- You're interested in learning by implementing core functionalities on your own.
2322
- You're working on a simple project where a framework might be overkill.
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
---
2+
pcx_content_type: navigation
3+
title: Static Assets
4+
sidebar:
5+
order: 6
6+
badge: Beta
7+
head: []
8+
description: Create full-stack applications deployed to Cloudflare Workers.
9+
---
10+
11+
import {
12+
Badge,
13+
Description,
14+
InlineBadge,
15+
Render,
16+
TabItem,
17+
Tabs,
18+
Feature,
19+
} from "~/components";
20+
21+
<Description>
22+
Create fast, scalable frontend applications deployed to Cloudflare Workers.
23+
</Description>
24+
25+
---
26+
27+
### What you can build
28+
29+
<Feature header="Static Websites" href="/workers/frameworks/get-started/#deploying-a-static-site" cta="Deploy a static site">
30+
31+
Deploy static sites like blogs, portfolios, or documentation pages. Serve HTML, CSS, JavaScript, and media files directly from Cloudflare's network for low-latency access worldwide.
32+
33+
</Feature>
34+
35+
<Feature header="Full-stack Applications" href="/workers/frameworks/get-started/#deploying-a-dynamic-site" cta="Deploy a full-stack application">
36+
37+
Build dynamic and interactive server-side rendered (SSR) applications on Cloudflare Workers.
38+
39+
Combine asset hosting with Cloudflare's data and storage products such as [Workers KV](/kv/), [Durable Objects](/durable-objects/), and [R2 Storage](/r2/) to build full-stack applications. Manage both frontend and backend logic on Cloudflare's Developer Platform.
40+
41+
</Feature>
42+
43+
### Supported frameworks
44+
45+
The following Frameworks are currently supported on Cloudflare Workers:
46+
47+
- Angular
48+
- Astro
49+
- Docusaurus
50+
- Gatsby
51+
- Nuxt
52+
- Qwik
53+
- Remix
54+
- Solid
55+
- Svelte
56+
57+
:::note
58+
59+
If you're looking for a framework not on this list, it may be supported in [Cloudflare Pages](/pages/). For example, popular frameworks such as [Next.js](/pages/framework-guides/nextjs/) and [Vue](/pages/framework-guides/deploy-a-vue-site/) are supported on Pages. Visit [Pages Frameworks guides](/pages/framework-guides/) for a full list.
60+
61+
Have a framework you would like to see supported on Workers or a feature request? Tell us about it! [link to feedback form]
62+
:::

src/content/docs/workers/configuration/assets/routing.mdx renamed to src/content/docs/workers/static-assets/routing.mdx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,14 @@ import {
1818
Tabs,
1919
} from "~/components";
2020

21-
## How it works
21+
## Routing: Worker and assets
2222

23-
Assets are served using file-based routing. The structure and organization of files in your project's directory determine the routing paths for your application. If a request is found with a matching path to the current route requested then that asset will always be served.
23+
Assets are served using file-based routing. The structure and organization of files in your project's directory determine the routing paths for your application. When a request invokes a Worker with assets:
24+
25+
1. If a request is found with a matching path to the current route requested then that asset will always be served.
26+
2. If there are no assets that match the current route requested then the Worker will be invoked. If there is no Worker, a 404 will be served dependent on [`not_found_handling`](/workers/static-assets/routing/#not_found_handling) configuration.
27+
28+
## Routing: Asset Serving
2429

2530
If a request does not match an asset based on file-based routing, files are served based on the configuration options defined. There are two areas of asset handling that can be configured:
2631

0 commit comments

Comments
 (0)