Skip to content

Commit 736d0ec

Browse files
authored
Merge branch 'main' into patch-35
2 parents 0168fc5 + d52a328 commit 736d0ec

File tree

231 files changed

+9250
-3995
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

231 files changed

+9250
-3995
lines changed

.github/actions/install/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ runs:
55
using: composite
66
steps:
77
- name: Setup PNPM
8-
uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4.3.0
8+
uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0
99

1010
- name: Setup Node
1111
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0

src/content/docs/en/concepts/islands.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ import Avatar from "../components/Avatar.astro";
114114

115115
This breaks up your page with smaller areas of server-rendered content that each load in parallel.
116116

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

119119
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.
120120

src/content/docs/en/editor-setup.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ In addition to local editors, Astro also runs well on in-browser hosted editors,
5555

5656
- [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!
5757
- [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.
5958

6059
## Other tools
6160

src/content/docs/en/guides/build-with-ai.mdx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -283,15 +283,11 @@ Zed doesn't support streaming HTTP, so it requires a local proxy configuration:
283283

284284
#### ChatGPT
285285

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-
290286
Refer to the [OpenAI MCP documentation](https://platform.openai.com/docs/mcp#test-and-connect-your-mcp-server) for specific setup instructions.
291287

292288
#### Raycast
293289

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

296292
Install by clicking the button below:
297293

src/content/docs/en/guides/cms/builderio.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ Things can sometimes go wrong when setting up the preview. If something's not ri
174174
* Make sure the site is live - for example, your dev server is running.
175175
* Make sure that the URLs match exactly - the one in your Astro project and the one set in the Builder app.
176176
* 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.
178178

179179
For more ideas, read [Builder's troubleshooting guide](https://www.builder.io/c/docs/guides/preview-url-working).
180180
:::

src/content/docs/en/guides/content-collections.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ You can provide your entries as an array of objects with an `id` property, or in
256256

257257
#### Parsing other data formats
258258

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).
260260

261261
The following example shows importing a third-party CSV parser then passing a custom `parser` function to the `file()` loader:
262262

@@ -419,7 +419,7 @@ relatedPosts:
419419
---
420420
```
421421

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).
423423

424424
## Querying build-time collections
425425

@@ -557,7 +557,7 @@ const englishDocsEntries = await getCollection('docs', ({ id }) => {
557557

558558
### Accessing referenced data
559559

560-
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`)
561561

562562
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.
563563

@@ -633,7 +633,7 @@ If your custom slugs contain the `/` character to produce URLs with multiple pat
633633
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:
634634

635635
- [`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.
637637

638638

639639
```astro title="src/pages/posts/[id].astro"

src/content/docs/en/guides/deploy/cloudflare.mdx

Lines changed: 3 additions & 147 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,8 @@ import { Steps } from '@astrojs/starlight/components';
1313
import StaticSsrTabs from '~/components/tabs/StaticSsrTabs.astro';
1414
import PackageManagerTabs from '~/components/tabs/PackageManagerTabs.astro'
1515

16-
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/).
1717

18-
This guide includes:
19-
20-
- [How to deploy to Cloudflare Workers](#cloudflare-workers)
21-
- [How to deploy to Cloudflare Pages](#cloudflare-pages)
2218

2319
:::note
2420

@@ -125,14 +121,14 @@ After your assets are uploaded, Wrangler will give you a preview URL to inspect
125121

126122
### How to deploy with CI/CD
127123

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

130126
If you're using Workers Builds:
131127

132128
<Steps>
133129
1. Follow Steps 1-3 from the Wrangler section above.
134130

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`.
136132

137133
3. Under `Import a repository`, select a Git account and then the repository containing your Astro project.
138134

@@ -143,144 +139,6 @@ If you're using Workers Builds:
143139
5. Click `Save and Deploy`. You can now preview your Worker at its provided `workers.dev` subdomain.
144140
</Steps>
145141

146-
## Cloudflare Pages
147-
148-
### How to deploy with Wrangler
149-
150-
<Steps>
151-
1. Install [Wrangler CLI](https://developers.cloudflare.com/workers/wrangler/get-started/).
152-
153-
<PackageManagerTabs>
154-
<Fragment slot="npm">
155-
```sh
156-
npm install wrangler@latest --save-dev
157-
```
158-
</Fragment>
159-
<Fragment slot="pnpm">
160-
```sh
161-
pnpm add wrangler@latest --save-dev
162-
```
163-
</Fragment>
164-
<Fragment slot="yarn">
165-
```sh
166-
yarn add wrangler@latest --dev
167-
```
168-
</Fragment>
169-
</PackageManagerTabs>
170-
171-
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-
<Fragment slot="npm">
177-
```sh
178-
npx astro add cloudflare
179-
```
180-
</Fragment>
181-
<Fragment slot="pnpm">
182-
```sh
183-
pnpm astro add cloudflare
184-
```
185-
</Fragment>
186-
<Fragment slot="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-
<Fragment slot="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-
<Fragment slot="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-
<Fragment slot="npm">
230-
```sh
231-
npx astro build && wrangler pages dev ./dist
232-
```
233-
</Fragment>
234-
<Fragment slot="pnpm">
235-
```sh
236-
pnpm astro build && wrangler pages dev ./dist
237-
```
238-
</Fragment>
239-
<Fragment slot="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-
<Fragment slot="npm">
250-
```sh
251-
npx astro build && wrangler pages deploy ./dist
252-
```
253-
</Fragment>
254-
<Fragment slot="pnpm">
255-
```sh
256-
pnpm astro build && wrangler pages deploy ./dist
257-
```
258-
</Fragment>
259-
<Fragment slot="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-
284142
## Troubleshooting
285143

286144
### 404 behavior
@@ -296,8 +154,6 @@ For Workers projects, you will need to set `not_found_handling` if you want to s
296154
}
297155
```
298156

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-
301157
### Client-side hydration
302158

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

src/content/docs/en/guides/fonts.mdx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ This example will demonstrate adding a custom font using the font file `DistantG
6464

6565
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.
6666

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/)).
6868

6969
<Steps>
7070

@@ -102,7 +102,7 @@ After [a font is configured](#configuring-custom-fonts), it must be added to you
102102
103103
<html>
104104
<head>
105-
<Font cssVariable="--font-distant-galaxy" preload />
105+
<Font cssVariable="--font-distant-galaxy" />
106106
</head>
107107
<body>
108108
<slot />
@@ -125,7 +125,7 @@ After [a font is configured](#configuring-custom-fonts), it must be added to you
125125
126126
<style>
127127
h1 {
128-
font-family: var("--font-distant-galaxy");
128+
font-family: var(--font-distant-galaxy);
129129
}
130130
</style>
131131
</Layout>
@@ -147,7 +147,7 @@ Instead, after [configuring your custom font](#configuring-custom-fonts) and [ad
147147
@import "tailwindcss";
148148

149149
@theme inline {
150-
--font-sans: var(--font-roboto);
150+
--font-sans: var(--font-roboto);
151151
}
152152
```
153153

@@ -158,22 +158,22 @@ Instead, after [configuring your custom font](#configuring-custom-fonts) and [ad
158158
```js title="tailwind.config.mjs" ins={6-8}
159159
/** @type {import("tailwindcss").Config} */
160160
export default {
161-
content: ["./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}"],
162-
theme: {
161+
content: ["./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}"],
162+
theme: {
163163
extend: {},
164164
fontFamily: {
165-
sans: ["var(--font-roboto)"]
165+
sans: ["var(--font-roboto)"]
166166
}
167-
},
168-
plugins: []
167+
},
168+
plugins: []
169169
};
170170
```
171171

172172
</TabItem>
173173

174174
</Tabs>
175175

176-
See [Tailwind's docs on adding custom font families](https://tailwindcss.com/docs/font-family#using-custom-values) for more information.
176+
See [Tailwind's docs on adding custom font families](https://tailwindcss.com/docs/font-family#using-a-custom-value) for more information.
177177

178178

179179
## Accessing font data programmatically
@@ -261,7 +261,7 @@ export default defineConfig({
261261
provider: fontProviders.google(),
262262
// Default included:
263263
// weights: [400] ,
264-
// styles: ["normal", "italics"],
264+
// styles: ["normal", "italic"],
265265
// subsets: ["latin"],
266266
// fallbacks: ["sans-serif"],
267267
// formats: ["woff2"],

0 commit comments

Comments
 (0)