@astrojs/starlight 0.17.3 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/404.astro +2 -0
- package/CHANGELOG.md +24 -0
- package/components/Page.astro +1 -0
- package/index.astro +2 -0
- package/index.ts +7 -0
- package/package.json +7 -7
package/404.astro
CHANGED
|
@@ -7,6 +7,8 @@ import { generateRouteData } from './utils/route-data';
|
|
|
7
7
|
import type { StarlightDocsEntry } from './utils/routing';
|
|
8
8
|
import { useTranslations } from './utils/translations';
|
|
9
9
|
|
|
10
|
+
export const prerender = true;
|
|
11
|
+
|
|
10
12
|
const { lang = 'en', dir = 'ltr' } = config.defaultLocale || {};
|
|
11
13
|
let locale = config.defaultLocale?.locale;
|
|
12
14
|
if (locale === 'root') locale = undefined;
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# @astrojs/starlight
|
|
2
2
|
|
|
3
|
+
## 0.18.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#1454](https://github.com/withastro/starlight/pull/1454) [`1d9ef56`](https://github.com/withastro/starlight/commit/1d9ef567907bed7210e75ab3460f536c0768a87f) Thanks [@Fryuni](https://github.com/Fryuni)! - Makes Starlight compatible with [on-demand server rendering](https://docs.astro.build/en/guides/server-side-rendering/) (sometimes referred to as server-side rendering or SSR).
|
|
8
|
+
|
|
9
|
+
Starlight pages are always prerendered, even when using `output: 'server'`.
|
|
10
|
+
|
|
11
|
+
- [#1454](https://github.com/withastro/starlight/pull/1454) [`1d9ef56`](https://github.com/withastro/starlight/commit/1d9ef567907bed7210e75ab3460f536c0768a87f) Thanks [@Fryuni](https://github.com/Fryuni)! - Enables Astro’s [`experimental.globalRoutePriority`](https://docs.astro.build/en/reference/configuration-reference/#experimentalglobalroutepriority) option and bumps the minimum required Astro version.
|
|
12
|
+
|
|
13
|
+
⚠️ **BREAKING CHANGE** The minimum supported Astro version is now 4.2.7. Upgrade Astro and Starlight together:
|
|
14
|
+
|
|
15
|
+
```sh
|
|
16
|
+
npx @astrojs/upgrade
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## 0.17.4
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- [#1473](https://github.com/withastro/starlight/pull/1473) [`29da505`](https://github.com/withastro/starlight/commit/29da505474174fefaec4e27a2c2c3e90e3f68a31) Thanks [@delucis](https://github.com/delucis)! - Fixes a CSS bug for users with JavaScript disabled
|
|
24
|
+
|
|
25
|
+
- [#1465](https://github.com/withastro/starlight/pull/1465) [`ce3108c`](https://github.com/withastro/starlight/commit/ce3108cf6ecb77d12db973485d21e0fc7fd63ca6) Thanks [@delucis](https://github.com/delucis)! - Updates internal MDX, sitemap, and Expressive Code dependencies to the latest versions
|
|
26
|
+
|
|
3
27
|
## 0.17.3
|
|
4
28
|
|
|
5
29
|
### Patch Changes
|
package/components/Page.astro
CHANGED
package/index.astro
CHANGED
package/index.ts
CHANGED
|
@@ -43,11 +43,15 @@ export default function StarlightIntegration({
|
|
|
43
43
|
injectRoute({
|
|
44
44
|
pattern: '404',
|
|
45
45
|
entrypoint: '@astrojs/starlight/404.astro',
|
|
46
|
+
// Ensure page is pre-rendered even when project is on server output mode
|
|
47
|
+
prerender: true,
|
|
46
48
|
});
|
|
47
49
|
}
|
|
48
50
|
injectRoute({
|
|
49
51
|
pattern: '[...slug]',
|
|
50
52
|
entrypoint: '@astrojs/starlight/index.astro',
|
|
53
|
+
// Ensure page is pre-rendered even when project is on server output mode
|
|
54
|
+
prerender: true,
|
|
51
55
|
});
|
|
52
56
|
// Add built-in integrations only if they are not already added by the user through the
|
|
53
57
|
// config or by a plugin.
|
|
@@ -78,6 +82,9 @@ export default function StarlightIntegration({
|
|
|
78
82
|
scopedStyleStrategy: 'where',
|
|
79
83
|
// If not already configured, default to prefetching all links on hover.
|
|
80
84
|
prefetch: config.prefetch ?? { prefetchAll: true },
|
|
85
|
+
experimental: {
|
|
86
|
+
globalRoutePriority: true,
|
|
87
|
+
},
|
|
81
88
|
});
|
|
82
89
|
},
|
|
83
90
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astrojs/starlight",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.0",
|
|
4
4
|
"description": "Build beautiful, high-performance documentation websites with Astro",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"docs",
|
|
@@ -163,22 +163,22 @@
|
|
|
163
163
|
"./style/markdown.css": "./style/markdown.css"
|
|
164
164
|
},
|
|
165
165
|
"peerDependencies": {
|
|
166
|
-
"astro": "^4.
|
|
166
|
+
"astro": "^4.2.7"
|
|
167
167
|
},
|
|
168
168
|
"devDependencies": {
|
|
169
|
-
"@astrojs/markdown-remark": "^4.
|
|
169
|
+
"@astrojs/markdown-remark": "^4.2.1",
|
|
170
170
|
"@types/node": "^18.16.19",
|
|
171
171
|
"@vitest/coverage-v8": "^1.2.2",
|
|
172
|
-
"astro": "^4.
|
|
172
|
+
"astro": "^4.3.4",
|
|
173
173
|
"vitest": "^1.2.2"
|
|
174
174
|
},
|
|
175
175
|
"dependencies": {
|
|
176
|
-
"@astrojs/mdx": "^2.
|
|
177
|
-
"@astrojs/sitemap": "^3.0.
|
|
176
|
+
"@astrojs/mdx": "^2.1.1",
|
|
177
|
+
"@astrojs/sitemap": "^3.0.5",
|
|
178
178
|
"@pagefind/default-ui": "^1.0.3",
|
|
179
179
|
"@types/hast": "^3.0.3",
|
|
180
180
|
"@types/mdast": "^4.0.3",
|
|
181
|
-
"astro-expressive-code": "^0.32.
|
|
181
|
+
"astro-expressive-code": "^0.32.4",
|
|
182
182
|
"bcp-47": "^2.1.0",
|
|
183
183
|
"hast-util-select": "^6.0.2",
|
|
184
184
|
"hastscript": "^8.0.0",
|