Skip to content

Commit 853663a

Browse files
committed
assetsignore
1 parent 391a107 commit 853663a

File tree

1 file changed

+12
-4
lines changed
  • src/content/docs/workers/frameworks/framework-guides

1 file changed

+12
-4
lines changed

src/content/docs/workers/frameworks/framework-guides/astro.mdx

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

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.
2222

2323
<PackageManagers
2424
type="create"
@@ -28,7 +28,7 @@ import {
2828

2929
---
3030

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.
3232

3333
[![Deploy to Workers](https://deploy.workers.cloudflare.com/button)](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)
3434

@@ -126,7 +126,15 @@ If your Astro project uses [on demand rendering (also known as SSR)](https://doc
126126
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).
127127
</Details>
128128

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**
130138

131139
In your project root, create a Wrangler configuration file with the following content:
132140

@@ -156,7 +164,7 @@ If your Astro project uses [on demand rendering (also known as SSR)](https://doc
156164
Read more about [Wrangler configuration options](/workers/wrangler/configuration/) and [asset configuration options](/workers/static-assets/routing/).
157165
</Details>
158166

159-
3. **Build and deploy your project**
167+
4. **Build and deploy your project**
160168

161169
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.
162170

0 commit comments

Comments
 (0)