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/en/concepts/islands.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -114,7 +114,7 @@ import Avatar from "../components/Avatar.astro";
114
114
115
115
This breaks up your page with smaller areas of server-rendered content that each load in parallel.
116
116
117
-
Your page's main content can be rendered immediately with placeholder content, such as a generic avatar until your island's own content is available. With server islands, having small components of personalized content does not delay the rendering of an otherwise static page.
117
+
Your page's main content can be rendered immediately with placeholder content, such as a generic avatar, until your island's own content is available. With server islands, having small components of personalized content does not delay the rendering of an otherwise static page.
118
118
119
119
This rendering pattern was built to be portable. It does not depend on any server infrastructure so it will work with any host, from a Node.js server in a Docker container to the serverless provider of your choice.
Copy file name to clipboardExpand all lines: src/content/docs/en/editor-setup.mdx
-1Lines changed: 0 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -55,7 +55,6 @@ In addition to local editors, Astro also runs well on in-browser hosted editors,
55
55
56
56
-[StackBlitz](https://stackblitz.com/) and [CodeSandbox](https://codesandbox.io/) - online editors that run in your browser, with built-in syntax highlighting support for `.astro` files. No installation or configuration required!
57
57
-[GitHub.dev](https://github.dev/) - allows you to install the Astro VS Code extension as a [web extension](https://code.visualstudio.com/api/extension-guides/web-extensions), which gives you access to only some of the full extension features. Currently, only syntax highlighting is supported.
58
-
-[Firebase Studio](https://firebase.studio/) - a full dev environment in the cloud that can install the official Astro VS Code Extension from Open VSX.
Copy file name to clipboardExpand all lines: src/content/docs/en/guides/build-with-ai.mdx
+1-5Lines changed: 1 addition & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -283,15 +283,11 @@ Zed doesn't support streaming HTTP, so it requires a local proxy configuration:
283
283
284
284
#### ChatGPT
285
285
286
-
:::caution[Limited availability]
287
-
MCP server integration is only available for ChatGPT Pro, Team, and Enterprise users. The setup process is more complex than other tools.
288
-
:::
289
-
290
286
Refer to the [OpenAI MCP documentation](https://platform.openai.com/docs/mcp#test-and-connect-your-mcp-server) for specific setup instructions.
291
287
292
288
#### Raycast
293
289
294
-
[Raycast](https://www.raycast.com/) can connect to MCP servers to enhance its AI capabilities. AI features such as MCP require a [Raycast Pro](https://www.raycast.com/pro) account, so ensure you have upgraded before trying to install. Adding the Astro Docs MCP server allows Raycast to access the latest Astro documentation while answering questions.
290
+
[Raycast](https://www.raycast.com/) can connect to MCP servers to enhance its AI capabilities. Adding the Astro Docs MCP server allows Raycast to access the latest Astro documentation while answering questions.
Copy file name to clipboardExpand all lines: src/content/docs/en/guides/cms/builderio.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -174,7 +174,7 @@ Things can sometimes go wrong when setting up the preview. If something's not ri
174
174
* Make sure the site is live - for example, your dev server is running.
175
175
* Make sure that the URLs match exactly - the one in your Astro project and the one set in the Builder app.
176
176
* Make sure it's the full URL including the protocol, for example `https://`.
177
-
* If you're working in a virtual environment like [Firebase Studio](https://studio.firebase.google.com/) or [StackBlitz](https://stackblitz.com/), you might have to copy and paste the URL again when you restart your workspace, since this usually generates a new URL for your project.
177
+
* If you're working in a virtual environment like [StackBlitz](https://stackblitz.com/), you might have to copy and paste the URL again when you restart your workspace, since this usually generates a new URL for your project.
178
178
179
179
For more ideas, read [Builder's troubleshooting guide](https://www.builder.io/c/docs/guides/preview-url-working).
Copy file name to clipboardExpand all lines: src/content/docs/en/guides/content-collections.mdx
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -256,7 +256,7 @@ You can provide your entries as an array of objects with an `id` property, or in
256
256
257
257
#### Parsing other data formats
258
258
259
-
Support for parsing single JSON, YAML, and TOML files into collection entries withe the `file()` loader is built-in (unless you have a [nested JSON document](#nested-json-documents)). To load your collection from unsupported file types, such as `.csv`, you will need to create a [parser function](/en/reference/content-loader-reference/#parser). This function can be made async if required (e.g. to fetch files from the web, or if your parser is asyncronous).
259
+
Support for parsing single JSON, YAML, and TOML files into collection entries with the `file()` loader is built-in (unless you have a [nested JSON document](#nested-json-documents)). To load your collection from unsupported file types, such as `.csv`, you will need to create a [parser function](/en/reference/content-loader-reference/#parser). This function can be made async if required (e.g. to fetch files from the web, or if your parser is asyncronous).
260
260
261
261
The following example shows importing a third-party CSV parser then passing a custom `parser` function to the `file()` loader:
262
262
@@ -419,7 +419,7 @@ relatedPosts:
419
419
---
420
420
```
421
421
422
-
These references will be transformed into objects containing a `collection` key and an `id` key, allowing you to easily [query them in your templates](/en/guides/content-collections/#accessing-referenced-data).
422
+
These references will be transformed into objects containing a `collection` key and an `id` key, allowing you to easily [query them in your templates](#accessing-referenced-data).
To access [references defined in your schema](/en/guides/content-collections/#defining-collection-references), first query your collection entry. Your references will be available on the returned `data` object. (e.g. `entry.data.author` and `entry.data.relatedPosts`)
560
+
To access [references defined in your schema](#defining-collection-references), first query your collection entry. Your references will be available on the returned `data` object. (e.g. `entry.data.author` and `entry.data.relatedPosts`)
561
561
562
562
Then, you can use the `getEntry()` function again (or `getEntries()` to retrieve multiple referenced entries) by passing those returned values. The `reference()` function in your schema transforms those values into one or more `collection` and `id` objects as a convenient way to query this related data.
563
563
@@ -633,7 +633,7 @@ If your custom slugs contain the `/` character to produce URLs with multiple pat
633
633
With an adapter installed for [on-demand rendering](/en/guides/on-demand-rendering/), you can generate your dynamic page routes at request time. First, examine the request (using `Astro.request` or `Astro.params`) to find the slug on demand, and then fetch it using one of Astro's content collection helper functions:
634
634
635
635
-[`getEntry()`](/en/reference/modules/astro-content/#getentry) for build-time collection pages that are generated once, upon first request.
636
-
-[`getLiveEntry()`](/en/reference/modules/astro-content/#getentry) for live collection pages where data is (re)fetched at each request time.
636
+
-[`getLiveEntry()`](/en/reference/modules/astro-content/#getliveentry) for live collection pages where data is (re)fetched at each request time.
You can deploy full-stack applications, including front-end static assets and back-end APIs, as well as on-demand rendered sites, to both [Cloudflare Workers](https://developers.cloudflare.com/workers/static-assets/) and [Cloudflare Pages](https://pages.cloudflare.com/).
16
+
You can deploy full-stack applications, including front-end static assets and back-end APIs, as well as on-demand rendered sites, to [Cloudflare Workers](https://developers.cloudflare.com/workers/static-assets/).
17
17
18
-
This guide includes:
19
-
20
-
-[How to deploy to Cloudflare Workers](#cloudflare-workers)
21
-
-[How to deploy to Cloudflare Pages](#cloudflare-pages)
22
18
23
19
:::note
24
20
@@ -125,14 +121,14 @@ After your assets are uploaded, Wrangler will give you a preview URL to inspect
125
121
126
122
### How to deploy with CI/CD
127
123
128
-
You can also use a CI/CD system such as [Workers Builds (BETA)](https://developers.cloudflare.com/workers/ci-cd/builds/) to automatically build and deploy your site on push.
124
+
You can also use a CI/CD system such as [Workers Builds](https://developers.cloudflare.com/workers/ci-cd/builds/) to automatically build and deploy your site on push.
129
125
130
126
If you're using Workers Builds:
131
127
132
128
<Steps>
133
129
1. Follow Steps 1-3 from the Wrangler section above.
134
130
135
-
2. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/) and navigate to `Workers & Pages`. Select `Create`.
131
+
2. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/) and navigate to `Compute > Workers & Pages`. Select `Create application`.
136
132
137
133
3. Under `Import a repository`, select a Git account and then the repository containing your Astro project.
138
134
@@ -143,144 +139,6 @@ If you're using Workers Builds:
143
139
5. Click `Save and Deploy`. You can now preview your Worker at its provided `workers.dev` subdomain.
2. If your site uses on-demand rendering, install the [`@astrojs/cloudflare` adapter](/en/guides/integrations-guide/cloudflare/).
172
-
173
-
This will install the adapter and make the appropriate changes to your `astro.config.mjs` file in one step.
174
-
175
-
<PackageManagerTabs>
176
-
<Fragmentslot="npm">
177
-
```sh
178
-
npx astro add cloudflare
179
-
```
180
-
</Fragment>
181
-
<Fragmentslot="pnpm">
182
-
```sh
183
-
pnpm astro add cloudflare
184
-
```
185
-
</Fragment>
186
-
<Fragmentslot="yarn">
187
-
```sh
188
-
yarn astro add cloudflare
189
-
```
190
-
</Fragment>
191
-
</PackageManagerTabs>
192
-
193
-
3. Create a [Wrangler configuration file](https://developers.cloudflare.com/workers/wrangler/configuration/).
194
-
195
-
Because Cloudflare recommends new projects use Workers instead of Pages, the `astro add cloudflare` command creates a `wrangler.jsonc` and `public/.assetsignore` file, which are specific to Workers projects. You will need to delete the `public/.assetsignore` file and change your `wrangler.jsonc` file. If you are not using the adapter you'll need to create it yourself.
196
-
197
-
Ensure your `wrangler.jsonc` file is structured like this:
198
-
199
-
<StaticSsrTabs>
200
-
<Fragmentslot="static">
201
-
```jsonc title="wrangler.jsonc"
202
-
{
203
-
"name":"my-astro-app",
204
-
"compatibility_date":"YYYY-MM-DD", // Update to the day you deploy
205
-
"pages_build_output_dir":"./dist"
206
-
}
207
-
```
208
-
</Fragment>
209
-
<Fragmentslot="ssr">
210
-
```jsonc title="wrangler.jsonc"
211
-
{
212
-
"name":"my-astro-app",
213
-
"compatibility_date":"YYYY-MM-DD", // Update to the day you deploy
214
-
"compatibility_flags": [
215
-
"nodejs_compat",
216
-
"disable_nodejs_process_v2"
217
-
],
218
-
"pages_build_output_dir":"./dist"
219
-
}
220
-
```
221
-
</Fragment>
222
-
</StaticSsrTabs>
223
-
224
-
<ReadMore>Read more about [on-demand rendering in Astro](/en/guides/on-demand-rendering/).</ReadMore>
225
-
226
-
3. Preview your project locally with Wrangler.
227
-
228
-
<PackageManagerTabs>
229
-
<Fragmentslot="npm">
230
-
```sh
231
-
npx astro build && wrangler pages dev ./dist
232
-
```
233
-
</Fragment>
234
-
<Fragmentslot="pnpm">
235
-
```sh
236
-
pnpm astro build && wrangler pages dev ./dist
237
-
```
238
-
</Fragment>
239
-
<Fragmentslot="yarn">
240
-
```sh
241
-
yarn astro build && wrangler pages dev ./dist
242
-
```
243
-
</Fragment>
244
-
</PackageManagerTabs>
245
-
246
-
4. Deploy using `npx wrangler deploy`.
247
-
248
-
<PackageManagerTabs>
249
-
<Fragmentslot="npm">
250
-
```sh
251
-
npx astro build && wrangler pages deploy ./dist
252
-
```
253
-
</Fragment>
254
-
<Fragmentslot="pnpm">
255
-
```sh
256
-
pnpm astro build && wrangler pages deploy ./dist
257
-
```
258
-
</Fragment>
259
-
<Fragmentslot="yarn">
260
-
```sh
261
-
yarn astro build && wrangler pages deploy ./dist
262
-
```
263
-
</Fragment>
264
-
</PackageManagerTabs>
265
-
</Steps>
266
-
267
-
After your assets are uploaded, Wrangler will give you a preview URL to inspect your site.
268
-
269
-
### How to deploy a site with CI/CD
270
-
271
-
<Steps>
272
-
1. Push your code to your git repository (e.g. GitHub, GitLab).
273
-
274
-
2. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/) and navigate to **Compute (Workers) > Workers & Pages**. Select **Create** and then select the **Pages** tab. Connect your git repository.
275
-
276
-
3. Configure your project with:
277
-
-**Framework preset**: `Astro`
278
-
-**Build command:**`npm run build`
279
-
-**Build output directory:**`dist`
280
-
281
-
4. Click the **Save and Deploy** button.
282
-
</Steps>
283
-
284
142
## Troubleshooting
285
143
286
144
### 404 behavior
@@ -296,8 +154,6 @@ For Workers projects, you will need to set `not_found_handling` if you want to s
296
154
}
297
155
```
298
156
299
-
For Pages projects, if you include a custom 404 page, it will be served by default. Otherwise, Pages will default to [Cloudflare's single-page application rendering behavior](https://developers.cloudflare.com/pages/configuration/serving-pages/#single-page-application-spa-rendering) and redirect to the home page instead of showing a 404 page.
300
-
301
157
### Client-side hydration
302
158
303
159
Client-side hydration may fail as a result of Cloudflare's Auto Minify setting. If you see `Hydration completed but contains mismatches` in the console, make sure to disable Auto Minify under Cloudflare settings.
Copy file name to clipboardExpand all lines: src/content/docs/en/guides/fonts.mdx
+11-11Lines changed: 11 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,7 +64,7 @@ This example will demonstrate adding a custom font using the font file `DistantG
64
64
65
65
Astro supports [several font providers](/en/reference/font-provider-reference/#built-in-providers) out of the box, including support for [Fontsource](https://fontsource.org/) that simplifies using Google Fonts and other open-source fonts.
66
66
67
-
The following example will use Fontsource to add custom font support, but the process is similar for any of Astro's built-in font providers (e.g. [Adobe](https://fonts.adobe.com/), [Bunny](https://fonts.bunny)).
67
+
The following example will use Fontsource to add custom font support, but the process is similar for any of Astro's built-in font providers (e.g. [Adobe](https://fonts.adobe.com/), [Bunny](https://fonts.bunny.net/)).
68
68
69
69
<Steps>
70
70
@@ -102,7 +102,7 @@ After [a font is configured](#configuring-custom-fonts), it must be added to you
0 commit comments