Skip to content

Commit 40bf5d4

Browse files
sarah11918gouravkhungeryanthomasdevematipicoArmandPhilippot
authored
Astro 5.13.0 release docs (#12144)
Co-authored-by: Gourav Khunger <[email protected]> Co-authored-by: Yan <[email protected]> Co-authored-by: Emanuele Stoppa <[email protected]> Co-authored-by: ArmandPhilippot <[email protected]> Co-authored-by: bjohansebas <[email protected]> Co-authored-by: Matt Kane <[email protected]> Co-authored-by: Sebastian Beltran <[email protected]> Co-authored-by: Florian Lefebvre <[email protected]> Co-authored-by: Armand Philippot <[email protected]> Co-authored-by: louisescher <[email protected]>
1 parent ac44bcb commit 40bf5d4

File tree

7 files changed

+208
-188
lines changed

7 files changed

+208
-188
lines changed

astro.sidebar.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,8 @@ export const sidebar = [
149149
'reference/experimental-flags/content-intellisense',
150150
'reference/experimental-flags/preserve-scripts-order',
151151
'reference/experimental-flags/heading-id-compat',
152-
'reference/experimental-flags/raw-env-values',
152+
'reference/experimental-flags/static-import-meta-env',
153+
'reference/experimental-flags/chrome-devtools-workspace',
153154
],
154155
}),
155156
'reference/legacy-flags',

src/content/docs/en/guides/integrations-guide/sitemap.mdx

Lines changed: 67 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ category: other
99
i18nReady: true
1010
---
1111
import PackageManagerTabs from '~/components/tabs/PackageManagerTabs.astro';
12+
import Since from '~/components/Since.astro';
1213

1314
This **[Astro integration][astro-integration]** generates a sitemap based on your pages when you build your Astro project.
1415

@@ -93,7 +94,7 @@ import { defineConfig } from 'astro/config';
9394
import sitemap from '@astrojs/sitemap';
9495

9596
export default defineConfig({
96-
site: 'https://stargazers.club',
97+
site: 'https://example.com',
9798
integrations: [sitemap()],
9899
// ...
99100
});
@@ -112,7 +113,7 @@ For extremely large sites, there may also be additional numbered files like `sit
112113
<?xml version="1.0" encoding="UTF-8"?>
113114
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
114115
<sitemap>
115-
<loc>https://stargazers.club/sitemap-0.xml</loc>
116+
<loc>https://example.com/sitemap-0.xml</loc>
116117
</sitemap>
117118
</sitemapindex>
118119
```
@@ -121,10 +122,10 @@ For extremely large sites, there may also be additional numbered files like `sit
121122
<?xml version="1.0" encoding="UTF-8"?>
122123
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1">
123124
<url>
124-
<loc>https://stargazers.club/</loc>
125+
<loc>https://example.com/</loc>
125126
</url>
126127
<url>
127-
<loc>https://stargazers.club/second-page/</loc>
128+
<loc>https://example.com/second-page/</loc>
128129
</url>
129130
</urlset>
130131
```
@@ -201,10 +202,10 @@ import { defineConfig } from 'astro/config';
201202
import sitemap from '@astrojs/sitemap';
202203

203204
export default defineConfig({
204-
site: 'https://stargazers.club',
205+
site: 'https://example.com',
205206
integrations: [
206207
sitemap({
207-
filter: (page) => page !== 'https://stargazers.club/secret-vip-lounge/',
208+
filter: (page) => page !== 'https://example.com/secret-vip-lounge/',
208209
}),
209210
],
210211
});
@@ -219,32 +220,61 @@ import { defineConfig } from 'astro/config';
219220
import sitemap from '@astrojs/sitemap';
220221

221222
export default defineConfig({
222-
site: 'https://stargazers.club',
223+
site: 'https://example.com',
223224
integrations: [
224225
sitemap({
225226
filter: (page) =>
226-
page !== 'https://stargazers.club/secret-vip-lounge-1/' &&
227-
page !== 'https://stargazers.club/secret-vip-lounge-2/' &&
228-
page !== 'https://stargazers.club/secret-vip-lounge-3/' &&
229-
page !== 'https://stargazers.club/secret-vip-lounge-4/',
227+
page !== 'https://example.com/secret-vip-lounge-1/' &&
228+
page !== 'https://example.com/secret-vip-lounge-2/' &&
229+
page !== 'https://example.com/secret-vip-lounge-3/' &&
230+
page !== 'https://example.com/secret-vip-lounge-4/',
230231
}),
231232
],
232233
});
233234
```
234235

235236
### customPages
236237

237-
In some cases, a page might be part of your deployed site but not part of your Astro project. If you'd like to include a page in your sitemap that *isn't* created by Astro, you can use this option.
238+
An array of externally-generated pages to be included in the generated sitemap file.
239+
240+
Use this option to include pages in your sitemap that are a part of your deployed site but are not created by Astro.
241+
242+
```js title="astro.config.mjs" ins={8}
243+
import { defineConfig } from 'astro/config';
244+
import sitemap from '@astrojs/sitemap';
245+
246+
export default defineConfig({
247+
site: 'https://example.com',
248+
integrations: [
249+
sitemap({
250+
customPages: ['https://example.com/external-page1', 'https://example.com/external-page2'],
251+
}),
252+
],
253+
});
254+
```
255+
256+
### customSitemaps
257+
258+
<p>
259+
260+
**Type:** `string[]`<br />
261+
**Default:** `[]`<br />
262+
<Since v="3.5.0" pkg="@astrojs/sitemap" />
263+
</p>
264+
265+
An array of externally-generated sitemaps to be included in the `sitemap-index.xml` file along with the generated sitemap entries.
266+
267+
Use this option to include external sitemaps in the `sitemap-index.xml` file created by Astro for sections of your deployed site that have their own sitemaps not created by Astro. This is helpful when you host multiple services under the same domain.
238268

239269
```js title="astro.config.mjs" ins={8}
240270
import { defineConfig } from 'astro/config';
241271
import sitemap from '@astrojs/sitemap';
242272

243273
export default defineConfig({
244-
site: 'https://stargazers.club',
274+
site: 'https://example.com',
245275
integrations: [
246276
sitemap({
247-
customPages: ['https://stargazers.club/external-page', 'https://stargazers.club/external-page2'],
277+
customSitemaps: ['https://example.com/blog/sitemap.xml', 'https://example.com/shop/sitemap.xml'],
248278
}),
249279
],
250280
});
@@ -259,7 +289,7 @@ import { defineConfig } from 'astro/config';
259289
import sitemap from '@astrojs/sitemap';
260290

261291
export default defineConfig({
262-
site: 'https://stargazers.club',
292+
site: 'https://example.com',
263293
integrations: [
264294
sitemap({
265295
entryLimit: 10000,
@@ -283,7 +313,7 @@ import { defineConfig } from 'astro/config';
283313
import sitemap from '@astrojs/sitemap';
284314

285315
export default defineConfig({
286-
site: 'https://stargazers.club',
316+
site: 'https://example.com',
287317
integrations: [
288318
sitemap({
289319
changefreq: 'weekly',
@@ -319,7 +349,7 @@ import { defineConfig } from 'astro/config';
319349
import sitemap from '@astrojs/sitemap';
320350

321351
export default defineConfig({
322-
site: 'https://stargazers.club',
352+
site: 'https://example.com',
323353
integrations: [
324354
sitemap({
325355
serialize(item) {
@@ -356,11 +386,11 @@ import { defineConfig } from 'astro/config';
356386
import sitemap from '@astrojs/sitemap';
357387

358388
export default defineConfig({
359-
site: 'https://stargazers.club',
389+
site: 'https://example.com',
360390
integrations: [
361391
sitemap({
362392
i18n: {
363-
defaultLocale: 'en', // All urls that don't contain `es` or `fr` after `https://stargazers.club/` will be treated as default locale, i.e. `en`
393+
defaultLocale: 'en', // All urls that don't contain `es` or `fr` after `https://example.com/` will be treated as default locale, i.e. `en`
364394
locales: {
365395
en: 'en-US', // The `defaultLocale` value must present in `locales` keys
366396
es: 'es-ES',
@@ -377,28 +407,28 @@ The resulting sitemap looks like this:
377407
```xml title="sitemap-0.xml"
378408
...
379409
<url>
380-
<loc>https://stargazers.club/</loc>
381-
<xhtml:link rel="alternate" hreflang="en-US" href="https://stargazers.club/"/>
382-
<xhtml:link rel="alternate" hreflang="es-ES" href="https://stargazers.club/es/"/>
383-
<xhtml:link rel="alternate" hreflang="fr-CA" href="https://stargazers.club/fr/"/>
410+
<loc>https://example.com/</loc>
411+
<xhtml:link rel="alternate" hreflang="en-US" href="https://example.com/"/>
412+
<xhtml:link rel="alternate" hreflang="es-ES" href="https://example.com/es/"/>
413+
<xhtml:link rel="alternate" hreflang="fr-CA" href="https://example.com/fr/"/>
384414
</url>
385415
<url>
386-
<loc>https://stargazers.club/es/</loc>
387-
<xhtml:link rel="alternate" hreflang="en-US" href="https://stargazers.club/"/>
388-
<xhtml:link rel="alternate" hreflang="es-ES" href="https://stargazers.club/es/"/>
389-
<xhtml:link rel="alternate" hreflang="fr-CA" href="https://stargazers.club/fr/"/>
416+
<loc>https://example.com/es/</loc>
417+
<xhtml:link rel="alternate" hreflang="en-US" href="https://example.com/"/>
418+
<xhtml:link rel="alternate" hreflang="es-ES" href="https://example.com/es/"/>
419+
<xhtml:link rel="alternate" hreflang="fr-CA" href="https://example.com/fr/"/>
390420
</url>
391421
<url>
392-
<loc>https://stargazers.club/fr/</loc>
393-
<xhtml:link rel="alternate" hreflang="en-US" href="https://stargazers.club/"/>
394-
<xhtml:link rel="alternate" hreflang="es-ES" href="https://stargazers.club/es/"/>
395-
<xhtml:link rel="alternate" hreflang="fr-CA" href="https://stargazers.club/fr/"/>
422+
<loc>https://example.com/fr/</loc>
423+
<xhtml:link rel="alternate" hreflang="en-US" href="https://example.com/"/>
424+
<xhtml:link rel="alternate" hreflang="es-ES" href="https://example.com/es/"/>
425+
<xhtml:link rel="alternate" hreflang="fr-CA" href="https://example.com/fr/"/>
396426
</url>
397427
<url>
398-
<loc>https://stargazers.club/es/second-page/</loc>
399-
<xhtml:link rel="alternate" hreflang="es-ES" href="https://stargazers.club/es/second-page/"/>
400-
<xhtml:link rel="alternate" hreflang="fr-CA" href="https://stargazers.club/fr/second-page/"/>
401-
<xhtml:link rel="alternate" hreflang="en-US" href="https://stargazers.club/second-page/"/>
428+
<loc>https://example.com/es/second-page/</loc>
429+
<xhtml:link rel="alternate" hreflang="es-ES" href="https://example.com/es/second-page/"/>
430+
<xhtml:link rel="alternate" hreflang="fr-CA" href="https://example.com/fr/second-page/"/>
431+
<xhtml:link rel="alternate" hreflang="en-US" href="https://example.com/second-page/"/>
402432
</url>
403433
...
404434
```
@@ -434,7 +464,7 @@ import { defineConfig } from 'astro/config';
434464
import sitemap from '@astrojs/sitemap';
435465

436466
export default defineConfig({
437-
site: 'https://stargazers.club',
467+
site: 'https://example.com',
438468
integrations: [
439469
sitemap({
440470
filenameBase: 'astronomy-sitemap'
@@ -443,7 +473,7 @@ export default defineConfig({
443473
});
444474
```
445475

446-
The given configuration will generate sitemap files at `https://stargazers.club/astronomy-sitemap-0.xml` and `https://stargazers.club/astronomy-sitemap-index.xml`.
476+
The given configuration will generate sitemap files at `https://example.com/astronomy-sitemap-0.xml` and `https://example.com/astronomy-sitemap-index.xml`.
447477

448478
## Examples
449479

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
title: Experimental Chrome DevTools workspace
3+
sidebar:
4+
label: Chrome DevTools workspace
5+
i18nReady: true
6+
---
7+
8+
import Since from '~/components/Since.astro';
9+
import { Steps } from '@astrojs/starlight/components';
10+
11+
12+
<p>
13+
14+
**Type:** `boolean`<br />
15+
**Default:** `false`<br />
16+
<Since v="5.13.0" />
17+
</p>
18+
19+
Enables experimental [Chrome DevTools workspace integration](https://developer.chrome.com/docs/devtools/workspaces) for the Astro dev server.
20+
21+
This feature allows you to edit files directly in Chrome DevTools and have those changes reflected in your local file system via a connected workspace folder. This is useful for applying edits such as adjusting CSS values without leaving your browser tab.
22+
23+
With this feature enabled, running `astro dev` will automatically configure a Chrome DevTools workspace for your project. Your project will then appear as an available [workspace source that you can connect](#connecting-your-project). Then, changes that you make in the "Sources" panel are automatically saved to your project source code.
24+
25+
To enable this feature, add the experimental flag `chromeDevtoolsWorkspace` to your Astro config:
26+
27+
```js title="astro.config.mjs" ins={4-6}
28+
import { defineConfig } from 'astro/config';
29+
30+
export default defineConfig({
31+
experimental: {
32+
chromeDevtoolsWorkspace: true,
33+
},
34+
});
35+
```
36+
37+
## Connecting your project
38+
39+
Astro will create the necessary configuration file to support Chrome DevTools workspaces. However, your project must also be [connected as a source](https://developer.chrome.com/docs/devtools/workspaces#manual-connection) to enable file saving.
40+
41+
<Steps>
42+
43+
1. [Start the Astro dev server](/en/develop-and-build/#start-the-astro-dev-server) with the appropriate CLI command for your package manager.
44+
45+
2. Navigate to your site preview (e.g. `http://localhost:4321/`) in Chrome and open DevTools.
46+
47+
3. Under the **Sources** > **Workspaces** tab, you will find your Astro project folder. Click **Connect** to add your directory as a workspace.
48+
49+
</Steps>
50+
51+
See the [Chrome DevTools workspace documentation](https://developer.chrome.com/docs/devtools/workspaces#connect) for more information.

src/content/docs/en/reference/experimental-flags/raw-env-values.mdx

Lines changed: 0 additions & 50 deletions
This file was deleted.

0 commit comments

Comments
 (0)