|
1 | 1 | --- |
2 | 2 | pcx_content_type: how-to |
3 | 3 | title: Astro |
4 | | -tags: ["full-stack"] |
| 4 | +tags: ["ssg", "full-stack"] |
5 | 5 | description: Create an Astro application and deploy it to Cloudflare Workers with Workers Assets. |
6 | 6 | --- |
7 | 7 |
|
@@ -38,7 +38,7 @@ import { |
38 | 38 |
|
39 | 39 | Astro emphasizes performance through minimal client-side JavaScript - by default, it renders as much content as possible at build time, or [on-demand](https://docs.astro.build/en/guides/on-demand-rendering/) on the "server" - this can be a Cloudflare Worker. [“Islands”](https://docs.astro.build/en/concepts/islands/) of JavaScript are added only where interactivity or personalization is needed. |
40 | 40 |
|
41 | | -Astro is also framework-agnostic, and supports every major UI framework, including React, Preact, Svelte, Vue, SolidJS , via its official [integrations](https://astro.build/integrations/). |
| 41 | +Astro is also framework-agnostic, and supports every major UI framework, including React, Preact, Svelte, Vue, SolidJS, via its official [integrations](https://astro.build/integrations/). |
42 | 42 |
|
43 | 43 | ## Deploy a new Astro project on Workers |
44 | 44 |
|
@@ -96,7 +96,7 @@ If your Astro project is entirely pre-rendered, follow these steps: |
96 | 96 | </WranglerConfig> |
97 | 97 | <Details header="What's this configuration doing?"> |
98 | 98 | The key part of this config is the `assets` field, which tells Wrangler where to find your static assets. In this case, we're telling Wrangler to look in the `./dist` directory. If your assets are in a different directory, update the `directory` value accordingly. |
99 | | - Read about other [asset configuration options](/workers/static-assets/routing/). |
| 99 | + Read about other [asset configuration options](/workers/wrangler/configuration/#assets). |
100 | 100 |
|
101 | 101 | Also note how there's no `main` field in this config - this is because you're only serving static assets, so no Worker code is needed for on demand rendering/SSR. |
102 | 102 | </Details> |
@@ -161,7 +161,7 @@ If your Astro project uses [on demand rendering (also known as SSR)](https://doc |
161 | 161 | - `main` points to the entry point of your Worker script. This is generated by the Astro adaptor, and is what powers your server-rendered pages. |
162 | 162 | - `assets.directory` tells Wrangler where to find your static assets. In this case, we're telling Wrangler to look in the `./dist` directory. If your assets are in a different directory, update the `directory` value accordingly. |
163 | 163 |
|
164 | | - Read more about [Wrangler configuration options](/workers/wrangler/configuration/) and [asset configuration options](/workers/static-assets/routing/). |
| 164 | + Read more about [Wrangler configuration options](/workers/wrangler/configuration/) and [asset configuration options](/workers/wrangler/configuration/#assets). |
165 | 165 | </Details> |
166 | 166 |
|
167 | 167 | 4. **Build and deploy your project** |
|
0 commit comments