@astrojs/starlight 0.17.4 → 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 +16 -0
- package/index.astro +2 -0
- package/index.ts +7 -0
- package/package.json +2 -2
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,21 @@
|
|
|
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
|
+
|
|
3
19
|
## 0.17.4
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
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,7 +163,7 @@
|
|
|
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
169
|
"@astrojs/markdown-remark": "^4.2.1",
|