Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
2a022e4
chore: update dependencies
HiDeoo Dec 15, 2025
22c7fa9
feat: zod 3 → 4
HiDeoo Dec 17, 2025
8974131
fix: remove useless zod descriptions
HiDeoo Dec 17, 2025
3a6d055
refactor: zod `.describe()` → `.meta()`
HiDeoo Dec 17, 2025
1ce3f0a
feat: remove `legacy.collections` support
HiDeoo Dec 18, 2025
cb6c2b5
chore: add todo for `legacy.collectionsBackwardsCompat`
HiDeoo Dec 18, 2025
312fc51
chore: update to `alpha.2`
HiDeoo Dec 19, 2025
f18123a
chore: update to `alpha.3`
HiDeoo Dec 19, 2025
5d4f5b4
feat: remove `headingIdCompat` experimental flag
HiDeoo Dec 19, 2025
7ba56fd
fix: error map
HiDeoo Dec 19, 2025
2f07584
test: remove deprecated vitest workspaces
HiDeoo Dec 19, 2025
d9c43b9
chore: update vitest to version `3.2.4`
HiDeoo Dec 19, 2025
6dd6ff1
fix: plugin hooks schema output
HiDeoo Dec 19, 2025
6830896
fix: `z.Schema` → `z.ZodType`
HiDeoo Dec 19, 2025
34ba7a3
chore: bump node.js version
HiDeoo Dec 19, 2025
986f226
docs: remove `z` references related to `astro:content`
HiDeoo Dec 19, 2025
6206617
test: disable `legacy-collection-config-file` test temporarily
HiDeoo Dec 19, 2025
1edbd99
chor: update to `alpha.4`
HiDeoo Dec 31, 2025
2e91c01
feat: update docsearch plugin
HiDeoo Dec 31, 2025
1b0ef81
fix: bump tailwind css example version
HiDeoo Jan 2, 2026
fc6a885
feat: vite plugin hook filters
HiDeoo Jan 2, 2026
84834fd
fix: docsearch config type
HiDeoo Jan 2, 2026
7df2bb4
test: fix a11y node.js issues
HiDeoo Jan 2, 2026
4a8ee42
ci: size-limit node version
HiDeoo Jan 2, 2026
3e35fe8
chore: update to `alpha.5`
HiDeoo Jan 9, 2026
e78143c
feat: add `legacy.collectionsBackwardsCompat` support
HiDeoo Jan 9, 2026
a9eb8ec
test: remove `.only` test
HiDeoo Jan 9, 2026
78009fd
Merge branch 'main' into hd/astro-v6
HiDeoo Jan 9, 2026
0e24c3b
fix: warning on importing `node:module` on recent Node.js 22 versions
HiDeoo Jan 9, 2026
09ad2c2
chore: update playwright
HiDeoo Jan 9, 2026
770105c
chore: update to `beta.1`
HiDeoo Jan 14, 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
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Based on https://github.com/withastro/astro/blob/main/.devcontainer/Dockerfile
FROM mcr.microsoft.com/devcontainers/javascript-node:0-18
FROM mcr.microsoft.com/devcontainers/javascript-node:0-22

# We uninstall pnpm here, since we enable the corepack version in the postCreateCommand
# This ensures we respect the "packageManager" version in package.json
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/---01-bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ body:
Thank you for taking the time to file a bug report! Please fill out this form as completely as possible.

✅ I am using the **latest versions of Starlight and Astro**.
✅ I am using a version of Node that supports ESM (`v14.18.0+`, or `v16.12.0+`).
✅ I am using a compatible version of Node.js (`v22.12.0+`).
- type: input
id: starlight-version
attributes:
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ concurrency:
cancel-in-progress: true

env:
NODE_VERSION: 18
NODE_VERSION: 22
ASTRO_TELEMETRY_DISABLED: true

jobs:
Expand Down Expand Up @@ -69,9 +69,6 @@ jobs:
- run: pnpm i
- name: Test packages
run: pnpm -r test:coverage
- name: Test legacy collections support
working-directory: packages/starlight
run: pnpm test:legacy

e2e-test:
name: 'Run E2E tests (${{ matrix.os }})'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/file-icons.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
with:
node-version: 18.20.8
node-version: 22.12.0
cache: 'pnpm'

- name: Install Dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
- uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
with:
node-version: 18.20.8
node-version: 22.12.0
cache: 'pnpm'
- run: pnpm i
- name: Format with Prettier
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lunaria.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
with:
node-version: 20.19.4
node-version: 22.12.0
cache: pnpm

- name: Install dependencies
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/size-limit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }}
cancel-in-progress: true

env:
NODE_VERSION: 22

jobs:
# This basic check runs size-limit for the current branch.
# It will fail if the branch pushes the size over the specified budget.
Expand All @@ -19,6 +22,11 @@ jobs:
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
- name: Setup Node
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'pnpm'
- run: pnpm i
- run: 'pnpm build:examples'
- run: pnpm size
Expand All @@ -32,6 +40,11 @@ jobs:
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
- name: Setup Node
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'pnpm'
- name: Run size-limit
uses: andresz1/size-limit-action@94bc357df29c36c8f8d50ea497c3e225c3c95d1d # v1.8.0
with:
Expand Down
8 changes: 6 additions & 2 deletions docs/__a11y__/test-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import Sitemapper from 'sitemapper';

// We use the Lunaria config to get the list of languages rather than the Astro config as importing
// the latter does not play well with Playwright.
import lunariaConfig from '../lunaria.config.json' assert { type: 'json' };
import lunariaConfig from '../lunaria.config.json' with { type: 'json' };

export { expect, type Locator } from '@playwright/test';

Expand Down Expand Up @@ -72,7 +72,11 @@ export const test = baseTest.extend<{

// A Playwright test fixture accessible from within all tests.
class DocsSite {
constructor(private readonly page: Page) {}
private readonly page: Page;

constructor(page: Page) {
this.page = page;
}

async getAllUrls() {
const sitemap = new Sitemapper({ url: config.sitemap.url });
Expand Down
4 changes: 2 additions & 2 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
"@astrojs/starlight": "workspace:*",
"@lunariajs/core": "^0.1.1",
"@types/culori": "^2.1.1",
"astro": "^5.6.1",
"astro": "^6.0.0-beta.1",
"culori": "^4.0.1",
"sharp": "^0.34.2"
},
"devDependencies": {
"@playwright/test": "^1.45.0",
"@playwright/test": "^1.57.0",
"axe-playwright": "^2.0.3",
"sitemapper": "^3.2.12",
"starlight-links-validator": "^0.14.0"
Expand Down
3 changes: 2 additions & 1 deletion docs/src/content.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { defineCollection, z } from 'astro:content';
import { defineCollection } from 'astro:content';
import { z } from 'astro/zod';
import { docsLoader, i18nLoader } from '@astrojs/starlight/loaders';
import { docsSchema, i18nSchema } from '@astrojs/starlight/schema';

Expand Down
3 changes: 2 additions & 1 deletion docs/src/content/docs/guides/i18n.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,8 @@ In the following example, a new, optional `custom.label` key is added to the def

```diff lang="js"
// src/content.config.ts
import { defineCollection, z } from 'astro:content';
import { defineCollection } from 'astro:content';
import { z } from 'astro/zod';
import { docsLoader, i18nLoader } from '@astrojs/starlight/loaders';
import { docsSchema, i18nSchema } from '@astrojs/starlight/schema';

Expand Down
2 changes: 1 addition & 1 deletion docs/src/content/docs/guides/sidebar.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ The configuration above generates the following sidebar:
Starlight can automatically generate a group in your sidebar based on a directory of your docs.
This is helpful when you do not want to manually enter each sidebar item in a group.

By default, pages are sorted in alphabetical order according to the file [`slug`](/reference/route-data/#slug).
By default, pages are sorted in alphabetical order according to the file [`id`](/reference/route-data/#id).

Add an autogenerated group using an object with `label` and `autogenerate` properties. Your `autogenerate` configuration must specify the `directory` to use for sidebar entries. For example, with the following configuration:

Expand Down
4 changes: 2 additions & 2 deletions docs/src/content/docs/manual-setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ export const collections = {
};
```

Starlight also supports the [`legacy.collections` flag](https://docs.astro.build/en/reference/legacy-flags/) where collections are handled using the legacy content collections implementation.
This is useful if you have an existing Astro project and are unable to make any changes to collections at this time to use a loader.
Starlight also supports the [`legacy.collectionsBackwardsCompat` flag](https://docs.astro.build/en/reference/legacy-flags/#collectionsbackwardscompat) which preserves some legacy v4 content collections features.
This is useful if you have an existing Astro project and are unable to make any changes to collections at this time to migrate to the Content Layer API introduced in v5.0.

### Add content

Expand Down
10 changes: 6 additions & 4 deletions docs/src/content/docs/reference/frontmatter.md
Original file line number Diff line number Diff line change
Expand Up @@ -428,9 +428,10 @@ The value should be a [Zod schema](https://docs.astro.build/en/guides/content-co

In the following example, we provide a stricter type for `description` to make it required and add a new optional `category` field:

```ts {10-15}
```ts {11-16}
// src/content.config.ts
import { defineCollection, z } from 'astro:content';
import { defineCollection } from 'astro:content';
import { z } from 'astro/zod';
import { docsLoader } from '@astrojs/starlight/loaders';
import { docsSchema } from '@astrojs/starlight/schema';

Expand All @@ -451,9 +452,10 @@ export const collections = {

To take advantage of the [Astro `image()` helper](https://docs.astro.build/en/guides/images/#images-in-content-collections), use a function that returns your schema extension:

```ts {10-15}
```ts {11-16}
// src/content.config.ts
import { defineCollection, z } from 'astro:content';
import { defineCollection } from 'astro:content';
import { z } from 'astro/zod';
import { docsLoader } from '@astrojs/starlight/loaders';
import { docsSchema } from '@astrojs/starlight/schema';

Expand Down
11 changes: 1 addition & 10 deletions docs/src/content/docs/reference/route-data.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -62,20 +62,11 @@ The site title for this page’s locale.
The value for the site title’s `href` attribute, linking back to the homepage, e.g. `/`.
For multilingual sites this will include the current locale, e.g. `/en/` or `/zh-cn/`.

### `slug`

**Type:** `string`

The slug for this page generated from the content filename.

This property is deprecated and will be removed in a future version of Starlight.
Migrate to the new Content Layer API by using [Starlight’s `docsLoader`](/manual-setup/#configure-content-collections) and use the [`id`](#id) property instead.

### `id`

**Type:** `string`

The slug for this page or the unique ID for this page based on the content filename if using the [`legacy.collections`](https://docs.astro.build/en/reference/legacy-flags/#collections) flag.
The slug for this page.

### `isFallback`

Expand Down
2 changes: 1 addition & 1 deletion examples/basics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"dependencies": {
"@astrojs/starlight": "^0.37.2",
"astro": "^5.6.1",
"astro": "^6.0.0-beta.1",
"sharp": "^0.34.2"
}
}
4 changes: 2 additions & 2 deletions examples/markdoc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/markdoc": "^0.13.3",
"@astrojs/markdoc": "^1.0.0-beta.4",
"@astrojs/starlight": "^0.37.2",
"@astrojs/starlight-markdoc": "^0.5.1",
"astro": "^5.6.1",
"astro": "^6.0.0-beta.1",
"sharp": "^0.34.2"
}
}
6 changes: 3 additions & 3 deletions examples/tailwind/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
"dependencies": {
"@astrojs/starlight": "^0.37.2",
"@astrojs/starlight-tailwind": "^4.0.2",
"@tailwindcss/vite": "^4.0.7",
"astro": "^5.6.1",
"@tailwindcss/vite": "^4.1.18",
"astro": "^6.0.0-beta.1",
"sharp": "^0.34.2",
"tailwindcss": "^4.0.7"
"tailwindcss": "^4.1.18"
}
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
},
"license": "MIT",
"devDependencies": {
"@astrojs/check": "^0.9.4",
"@astrojs/check": "^0.9.6",
"@changesets/changelog-github": "^0.5.0",
"@changesets/cli": "^2.27.9",
"@eslint/js": "^9.33.0",
"@size-limit/file": "^11.1.6",
"astro": "^5.6.1",
"astro": "^6.0.0-beta.1",
"eslint": "^9.33.0",
"eslint-config-prettier": "^10.1.8",
"globals": "^16.3.0",
Expand Down
Loading
Loading