You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/docs/workers/frameworks/framework-guides/astro.mdx
+12-4Lines changed: 12 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ import {
18
18
PackageManagers,
19
19
} from"~/components";
20
20
21
-
**Start from CLI** - scaffold an Astro project on Workers, and pick your template.
21
+
**Start from CLI**: Scaffold an Astro project on Workers, and pick your template.
22
22
23
23
<PackageManagers
24
24
type="create"
@@ -28,7 +28,7 @@ import {
28
28
29
29
---
30
30
31
-
**Or just deploy** - create a static blog with Astro and deploy it on Cloudflare Workers.
31
+
**Or just deploy**: Create a static blog with Astro and deploy it on Cloudflare Workers, with CI/CD and previews all set up for you.
32
32
33
33
[](https://dash.cloudflare.com/?to=/:account/workers-and-pages/create/deploy-to-workers&repository=https://github.com/cloudflare/templates/tree/staging/astro-blog-starter-template)
34
34
@@ -126,7 +126,15 @@ If your Astro project uses [on demand rendering (also known as SSR)](https://doc
126
126
This command installs the Cloudflare adapter and makes the appropriate changes to your `astro.config.mjs` file in one step. By default, this sets the build output configuration to `output: 'server'`, which server renders all your pages by default. If there are certain pages that *don't* need on demand rendering/SSR, for example static pages like a privacy policy, you should set `export const prerender = true` for that page or route to pre-render it. You can read more about the adapter configuration options [in the Astro docs](https://docs.astro.build/en/guides/integrations-guide/cloudflare/#options).
127
127
</Details>
128
128
129
-
2.**Add a Wrangler configuration file**
129
+
2.**Add a `.assetsignore` file**
130
+
Create a `.assetsignore` file in your `public/` folder, and add the following lines to it:
131
+
132
+
```title=".assetsignore"
133
+
_worker.js
134
+
_routes.json
135
+
```
136
+
137
+
3.**Add a Wrangler configuration file**
130
138
131
139
In your project root, create a Wrangler configuration file with the following content:
132
140
@@ -156,7 +164,7 @@ If your Astro project uses [on demand rendering (also known as SSR)](https://doc
156
164
Read more about [Wrangler configuration options](/workers/wrangler/configuration/) and [asset configuration options](/workers/static-assets/routing/).
157
165
</Details>
158
166
159
-
3.**Build and deploy your project**
167
+
4.**Build and deploy your project**
160
168
161
169
You can deploy your project to a [`*.workers.dev` subdomain](/workers/configuration/routing/workers-dev/) or a [custom domain](/workers/configuration/routing/custom-domains/) from your local machine or any CI/CD system (including [Workers Builds](/workers/ci-cd/#workers-builds)). Use the following command to build and deploy. If you're using a CI service, be sure to update your "deploy command" accordingly.
0 commit comments