Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
8e2e14b
i18n(fr): update `experimental-flags/advanced-routing.mdx` (#13969)
ArmandPhilippot Jun 3, 2026
db6d7cc
i18n(ja): update `build-with-ai.mdx` (#13972)
morinokami Jun 4, 2026
6b8cafe
i18n(ja): update guides deploy github.mdx (#13976)
Yusaku01 Jun 4, 2026
27ecdc7
i18n(ko-KR): update `advanced-routing.mdx` (#13964)
jsparkdev Jun 5, 2026
625a502
i18n(ko-KR): update `images`, `image-service-reference`, add `imageki…
jsparkdev Jun 5, 2026
a312d77
Add Zero CMS guide (#13963)
samppis Jun 5, 2026
068fd73
fix(en): capitalize TypeScript and JavaScript brand names (#13981)
kailauber Jun 5, 2026
bc455d7
docs(en): fix doubled "the the" typo in images guide (#13979)
kailauber Jun 5, 2026
6251b30
docs(en): remove duplicate `astro` language tag in two code fences (#…
kailauber Jun 5, 2026
2ca7b1e
ci: update error reference docs (#13989)
astrobot-houston Jun 5, 2026
c5aaa25
Correct Vite config syntax in styling.mdx (#13988)
muhaimincs Jun 5, 2026
a9196b8
fix: fix github url in `guides/deploy/github.mdx` (#13991)
vrabe Jun 5, 2026
7b5bde3
i18n(zh-tw): update `guides/configuring-astro.mdx` (#13992)
vrabe Jun 5, 2026
f1cbb8a
i18n(ja): update `server-islands.mdx` (#13973)
morinokami Jun 5, 2026
3a09ad3
fix: remove broken Balanced Chef theme link from Sanity page [i18nIgn…
McVyp Jun 5, 2026
62f13d3
i18n(ja): add `data-fetching.mdx` (#13971)
morinokami Jun 6, 2026
14c65d9
i18n(ja): add `markdown-content.mdx` and update `mdx.mdx` (#13970)
morinokami Jun 6, 2026
1ea83dd
i18n(ja): update `syntax-highlighting.mdx` (#13975)
morinokami Jun 6, 2026
943430d
i18n(ko-KR): update `getting-started`, `contentful`, `github`, `2-pag…
jsparkdev Jun 7, 2026
02102c4
i18n(zh-tw): update `getting-started.mdx` (#13998)
vrabe Jun 7, 2026
4dac6ae
i18n(ko-KR): update `styling.mdx` and `errors/` (#14001)
jsparkdev Jun 7, 2026
8da1b88
i18n(ko-KR): capitalize TypeScript and JavaScript brand names (#14000)
jsparkdev Jun 7, 2026
d8b5b81
ci: update docs contributors (#14009)
astrobot-houston Jun 8, 2026
4cc67d4
feat(fonts): include subset field in fontData from astro:assets
florian-lefebvre Jun 8, 2026
282179c
Apply suggestions from code review
florian-lefebvre Jun 8, 2026
a56c044
Update src/content/docs/en/reference/modules/astro-assets.mdx
florian-lefebvre Jun 8, 2026
aa42f66
Apply suggestion from @ArmandPhilippot
florian-lefebvre Jun 8, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions public/logos/zero.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed src/assets/thumbnails/astro-chef-project.png
Binary file not shown.
2 changes: 1 addition & 1 deletion src/content/docs/en/guides/cms/contentful.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ const posts = entries.items.map((item) => {

Finally, you can use `posts` in your template to show a preview of each blog post.

```astro astro title="src/pages/index.astro" ins={19-37}
```astro title="src/pages/index.astro" ins={19-37}
---
import { contentfulClient } from "../lib/contentful";
import type { BlogPost } from "../lib/contentful";
Expand Down
8 changes: 0 additions & 8 deletions src/content/docs/en/guides/cms/sanity.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ logo: sanity
i18nReady: true
---

import Grid from '~/components/FluidGrid.astro'
import Card from '~/components/ShowcaseCard.astro'

[Sanity](https://www.sanity.io) is a headless content management system that focuses on [structured content](https://www.sanity.io/structured-content-platform).

Expand All @@ -21,9 +19,3 @@ import Card from '~/components/ShowcaseCard.astro'
- [Build your blog with Astro and Sanity](https://www.sanity.io/guides/sanity-astro-blog)

- [A minimal Astro site with a Sanity Studio](https://www.sanity.io/templates/astro-sanity-clean)

## Themes

<Grid>
<Card title="The Balanced Chef" href="https://astro.build/themes/details/the-balanced-chef/" thumbnail="astro-chef-project.png"/>
</Grid>
12 changes: 12 additions & 0 deletions src/content/docs/en/guides/cms/zero.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
title: Zero & Astro
description: Add content to your Astro project using Zero as a CMS
sidebar:
label: Zero
type: cms
logo: zero
i18nReady: true
stub: true
---

[Zero](https://www.zerocms.io) is an AI-native, Git-based CMS built specifically for Astro, requiring no integration and working directly with existing Zod schemas and Astro components.
2 changes: 1 addition & 1 deletion src/content/docs/en/guides/configuring-astro.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ We recommend using the default file format `.mjs` in most cases, or `.ts` if you

## The TypeScript config File

Every Astro starter project includes a `tsconfig.json` file in your project. Astro's [component script](/en/basics/astro-components/#the-component-script) is Typescript, which provides Astro's editor tooling and allows you to optionally add syntax to your JavaScript for type checking of your own project code.
Every Astro starter project includes a `tsconfig.json` file in your project. Astro's [component script](/en/basics/astro-components/#the-component-script) is TypeScript, which provides Astro's editor tooling and allows you to optionally add syntax to your JavaScript for type checking of your own project code.

Use the `tsconfig.json` file to configure the TypeScript template that will perform type checks on your code, configure TypeScript plugins, set import aliases, and more.

Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/en/guides/deploy/github.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ Follow the instructions below to use the GitHub Action to deploy your Astro site

3. In `astro.config.mjs`, configure a value for [`base`](/en/reference/configuration-reference/#base) (usually required).

GitHub Pages will publish your website at an address that depends on both your username and your repository name (e.g. `https://<username>/github.io/<my-repo>/`). Set a value for `base` that specifies the repository for your website. This is so that Astro understands your website's root is `/my-repo`, rather than the default `/`. You can skip this if your repository name matches the special `<username>.github.io` pattern (e.g. `https://github.com/username/username.github.io/`)
GitHub Pages will publish your website at an address that depends on both your username and your repository name (e.g. `https://<username>.github.io/<my-repo>/`). Set a value for `base` that specifies the repository for your website. This is so that Astro understands your website's root is `/my-repo`, rather than the default `/`. You can skip this if your repository name matches the special `<username>.github.io` pattern (e.g. `https://github.com/username/username.github.io/`)

Configure `base` as the repository’s name starting with a forward slash ( e.g. `/my-repo`):

Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/en/guides/images.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ import rocket from '../assets/rocket.png';

# My MDX Page

// Local image stored in the the same folder
// Local image stored in the same folder
![Houston in the wild](houston.png)

// Local image stored in src/assets/
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/en/guides/integrations-guide/sitemap.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ import {
<Since pkg="@astrojs/sitemap" v="1.3.2" />
</p>

A [Typescript enumeration](https://www.typescriptlang.org/docs/handbook/enums.html) where each key is the uppercase version of a valid value defined in the [specification of `<changefreq>`](https://www.sitemaps.org/protocol.html#changefreqdef).
A [TypeScript enumeration](https://www.typescriptlang.org/docs/handbook/enums.html) where each key is the uppercase version of a valid value defined in the [specification of `<changefreq>`](https://www.sitemaps.org/protocol.html#changefreqdef).

The following example uses `serialize()` to update the [`changefreq`](#sitemapitemchangefreq) of the blog index:

Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/en/guides/styling.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,7 @@ export default defineConfig({
build: {
assetsInlineLimit: 1024,
}
};
}
});
```

Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/en/guides/syntax-highlighting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ A Markdown code block is indicated by a block with three backticks \`\`\` at the

``````markdown
```js
// Javascript code with syntax highlighting.
// JavaScript code with syntax highlighting.
var fun = function lang(l) {
dateformat.i18n = require('./lang/' + l);
return true;
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/en/guides/typescript.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ declare namespace App {
}
```

A `.d.ts` file is an [ambient module](https://www.typescriptlang.org/docs/handbook/modules/reference.html#ambient-modules) declaration. While its syntax is similar to ES modules, these files do not allow top-level imports/exports. If Typescript encounters one, the file will be considered a [module augmentation](https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation) and this will break your global types.
A `.d.ts` file is an [ambient module](https://www.typescriptlang.org/docs/handbook/modules/reference.html#ambient-modules) declaration. While its syntax is similar to ES modules, these files do not allow top-level imports/exports. If TypeScript encounters one, the file will be considered a [module augmentation](https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation) and this will break your global types.

## Component Props

Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/en/guides/upgrade-to/v5.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1229,7 +1229,7 @@ export default {

<ReadMore>Read more about [developing a dev toolbar app for Astro using the Dev Toolbar API](/en/reference/dev-toolbar-app-reference/).</ReadMore>

### Removed: configuring Typescript during `create-astro`
### Removed: configuring TypeScript during `create-astro`

<SourcePR number="12083" title="create-astro updates"/>

Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/en/reference/content-loader-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@ This section shows the API for defining a [build-time object loader](#building-a

A loader function returns an object with two required properties. In addition to providing a name for the loader, this object describes how to fetch the collection data.

Optionally, you can return a third property defining a schema to validate your collection entries. Use the [Typescript `satisfies` operator](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-9.html#the-satisfies-operator) instead of a return type annotation to provide type safety inside your loader object and to preserve type inference when your loader is used in a collection.
Optionally, you can return a third property defining a schema to validate your collection entries. Use the [TypeScript `satisfies` operator](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-9.html#the-satisfies-operator) instead of a return type annotation to provide type safety inside your loader object and to preserve type inference when your loader is used in a collection.

#### `Loader.name`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ The `params` property in `getStaticPaths()`'s return value (an array of objects)
---
export async function getStaticPaths() {
return [
{ params: { slug: "blog" } },
{ params: { slug: "about" } }
{ params: { id: "blog" } },
{ params: { id: "about" } }
];
}
---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import DontEditWarning from '~/components/DontEditWarning.astro'
```ts title="pages/blog/[id].astro"
export async function getStaticPaths() {
return [ // <-- Array
{ params: { slug: "blog" } }, // <-- Object
{ params: { slug: "about" } }
{ params: { id: "blog" } }, // <-- Object
{ params: { id: "about" } }
];
}
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import DontEditWarning from '~/components/DontEditWarning.astro'
```ts title="pages/blog/[id].astro"
export async function getStaticPaths() {
return [ // <-- Array
{ params: { slug: "blog" } },
{ params: { slug: "about" } }
{ params: { id: "blog" } },
{ params: { id: "about" } }
];
}
```
Expand Down
12 changes: 11 additions & 1 deletion src/content/docs/en/reference/modules/astro-assets.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,7 @@ Describes the [properties of a remote image](#image-). This ensures that when [`

<p>

**Type:** `{ src: Array<{ url: string; format?: string; tech?: string }>; weight?: string; style?: string; }`<br />
**Type:** `{ src: Array<{ url: string; format?: string; tech?: string }>; weight?: string; style?: string; subset?: string; }`<br />
<Since v="6.0.0" />
</p>

Expand Down Expand Up @@ -821,6 +821,16 @@ Specifies the font weight (e.g. `400`, `600`).

Specifies the font style (e.g. `normal`, `italic`).

### `FontData.subset`

<p>

**Type:** `string`
<Since v="7.0.0" />
</p>

Specifies the font subset (e.g. `latin`, `cyrillic`).

## Imports from `astro/assets`

The following helpers are imported from the regular assets module:
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/en/reference/modules/astro-middleware.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import {
**Type:** <code>(fn: <a href="#middlewarehandler">MiddlewareHandler</a>) => MiddlewareHandler</code>
</p>

A function for defining a middleware function with type safety. When you use this utility, the [`context`](#context) and [`next()`](#next) arguments are automatically typed, and you will get a Typescript error if you try to return a [value not supported in your middleware](#middlewarehandler).
A function for defining a middleware function with type safety. When you use this utility, the [`context`](#context) and [`next()`](#next) arguments are automatically typed, and you will get a TypeScript error if you try to return a [value not supported in your middleware](#middlewarehandler).

```ts title="src/middleware.ts"
import { defineMiddleware } from "astro:middleware";
Expand Down
4 changes: 2 additions & 2 deletions src/content/docs/en/reference/modules/astro-zod.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ const user = z.object({
});
```

#### Extracting a Typescript type
#### Extracting a TypeScript type

Zod allows you to create a Typescript type from any schema [using Zod type inference](https://zod.dev/basics#inferring-types). This can be useful for describing an expected data structure when [defining component props](/en/guides/typescript/#component-props).
Zod allows you to create a TypeScript type from any schema [using Zod type inference](https://zod.dev/basics#inferring-types). This can be useful for describing an expected data structure when [defining component props](/en/guides/typescript/#component-props).

The following example create a `User` type based on the previous schema:

Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/en/tutorial/2-pages/1.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ Add a third page `blog.astro` to your site, following the [same steps as above](
You should now have a website with three pages that all link to each other. It's time to add some content to the Blog page.

Update the page content at `blog.astro` with:
```astro astro title="src/pages/blog.astro" ins={7-8} del={6}
```astro title="src/pages/blog.astro" ins={7-8} del={6}
<body>
<a href="/">Home</a>
<a href="/about/">About</a>
Expand Down
8 changes: 0 additions & 8 deletions src/content/docs/es/guides/cms/sanity.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ logo: sanity
i18nReady: true
---

import Grid from '~/components/FluidGrid.astro'
import Card from '~/components/ShowcaseCard.astro'

[Sanity](https://www.sanity.io) es un sistema de gestión de contenido headless que se enfoca en [contenido estructurado](https://www.sanity.io/structured-content-platform).

Expand All @@ -21,9 +19,3 @@ import Card from '~/components/ShowcaseCard.astro'
- [Construye tu blog con Astro y Sanity](https://www.sanity.io/guides/sanity-astro-blog)

- [Un sitio Astro mínimo con Sanity Studio](https://www.sanity.io/templates/astro-sanity-clean)

## Temas

<Grid>
<Card title="The Balanced Chef" href="https://astro.build/themes/details/the-balanced-chef/" thumbnail="astro-chef-project.png"/>
</Grid>
8 changes: 0 additions & 8 deletions src/content/docs/fr/guides/cms/sanity.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ logo: sanity
i18nReady: true
---

import Grid from '~/components/FluidGrid.astro'
import Card from '~/components/ShowcaseCard.astro'

[Sanity](http://sanity.io) est un système de gestion de contenu headless qui se concentre sur le [contenu structuré](https://www.sanity.io/structured-content-platform).

Expand All @@ -21,9 +19,3 @@ import Card from '~/components/ShowcaseCard.astro'
- [Construisez votre blog avec Astro et Sanity](https://www.sanity.io/guides/sanity-astro-blog) (Anglais)

- [Un site Astro minimal avec un Sanity Studio](https://www.sanity.io/templates/astro-sanity-clean) (Anglais)

## Thèmes

<Grid>
<Card title="The Balanced Chef" href="https://astro.build/themes/details/the-balanced-chef/" thumbnail="astro-chef-project.png"/>
</Grid>
Original file line number Diff line number Diff line change
Expand Up @@ -477,3 +477,53 @@ export default app;
```

Le module `astro/hono` exporte les mêmes noms de gestionnaires que `astro/fetch` (`astro`, `pages`, `middleware`, `actions`, `sessions`, `redirects`, `cache`, `i18n`, `trailingSlash`), mais chacun renvoie une fonction middleware Hono. Cela vous permet de mélanger les gestionnaires d'Astro avec n'importe quel middleware Hono de l'écosystème.

## Adaptateur Cloudflare

L'adaptateur [`@astrojs/cloudflare`](/fr/guides/integrations-guide/cloudflare/) fournit des gestionnaires complémentaires qui appliquent une configuration spécifique à Cloudflare à votre pipeline de routage avancé. Ces gestionnaires configurent l'injection de liaison KV pour les sessions, la diffusion de ressources statiques via la liaison `ASSETS`, `Astro.locals.cfContext`, l'adresse du client à partir de l'en-tête `cf-connecting-ip`, `waitUntil` et la récupération des pages d'erreur pré-rendues.

Vous pouvez utiliser les API `astro/fetch` et `astro/hono` depuis `src/app.ts` sur Cloudflare sans ces gestionnaires. Le point d'entrée par défaut de l'adaptateur prend en charge la configuration spécifique à Cloudflare pour vous. Ces gestionnaires complémentaires sont utiles lorsque vous avez déjà un [point d'entrée de worker personnalisé](https://developers.cloudflare.com/workers/wrangler/configuration/#inheritable-keys) (`src/worker.ts`), par exemple, pour exporter un objet durable (Durable Object), et que vous souhaitez utiliser les API de routage avancé directement depuis ce fichier.

Lorsque vous utilisez ces gestionnaires dans votre point d'entrée de worker, ils remplacent la fonctionnalité du gestionnaire par défaut de l'adaptateur, vous ne devez donc pas utiliser les deux en même temps. Placez le gestionnaire Cloudflare avant les autres gestionnaires d'Astro afin que les liaisons et les locaux soient disponibles pour le reste du pipeline.

### `@astrojs/cloudflare/fetch`

<p><Since v="13.6.0" pkg="@astrojs/cloudflare" /></p>

Pour une utilisation avec `astro/fetch`. La fonction `cf()` reçoit un objet `FetchState`, l'`env` de Cloudflare et le contexte d'exécution (`ExecutionContext`). Elle renvoie une réponse (`Response`) pour les accès aux ressources statiques, ou `undefined` lorsque la requête doit se poursuivre avec le rendu d'Astro :

```ts title="src/worker.ts"
import { astro, FetchState } from 'astro/fetch';
import { cf } from '@astrojs/cloudflare/fetch';

export default {
async fetch(request: Request, env: Env, ctx: ExecutionContext) {
const state = new FetchState(request);
const asset = await cf(state, env, ctx);
if (asset) return asset;
return astro(state);
},
};
```

### `@astrojs/cloudflare/hono`

<p><Since v="13.6.0" pkg="@astrojs/cloudflare" /></p>

Pour une utilisation avec `astro/hono`. La fonction `cf()` renvoie un middleware Hono qui lit automatiquement `env` et `executionCtx` depuis le contexte d'Hono :

```ts title="src/worker.ts"
import { Hono } from 'hono';
import { actions, middleware, pages, i18n } from 'astro/hono';
import { cf } from '@astrojs/cloudflare/hono';

const app = new Hono<{ Bindings: Env }>();

app.use(cf());
app.use(actions());
app.use(middleware());
app.use(pages());
app.use(i18n());

export default app;
```
Loading
Loading