@astrojs/starlight 0.33.0 → 0.33.2
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/CHANGELOG.md +16 -0
- package/package.json +6 -6
- package/utils/head.ts +23 -0
- package/utils/user-config.ts +7 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @astrojs/starlight
|
|
2
2
|
|
|
3
|
+
## 0.33.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#3090](https://github.com/withastro/starlight/pull/3090) [`fc3ffa8`](https://github.com/withastro/starlight/commit/fc3ffa8e27a3113a8eb70a3d8e7bf69c2bb214e5) Thanks [@delucis](https://github.com/delucis)! - Updates internal `@astrojs/mdx`, `@astrojs/sitemap`, and `astro-expressive-code` dependencies
|
|
8
|
+
|
|
9
|
+
- [#3109](https://github.com/withastro/starlight/pull/3109) [`b5cc1b4`](https://github.com/withastro/starlight/commit/b5cc1b4d4ee7dc737616c6ada893369b13ddb9c6) Thanks [@dhruvkb](https://github.com/dhruvkb)! - Updates Expressive Code to v0.41.1
|
|
10
|
+
|
|
11
|
+
## 0.33.1
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#3088](https://github.com/withastro/starlight/pull/3088) [`1885049`](https://github.com/withastro/starlight/commit/18850491905fc1bf9e467b1d65c7f1709daf3c30) Thanks [@HiDeoo](https://github.com/HiDeoo)! - Fixes a regression in Starlight version `0.33.0` that caused the description and links to language alternates for multilingual websites to be missing from the` <head>` of the page.
|
|
16
|
+
|
|
17
|
+
- [#3065](https://github.com/withastro/starlight/pull/3065) [`463adf5`](https://github.com/withastro/starlight/commit/463adf53b263a963736cb441bc1dd515f3c81894) Thanks [@HiDeoo](https://github.com/HiDeoo)! - Updates the `social` configuration option TSDoc example to match the shape of the expected value.
|
|
18
|
+
|
|
3
19
|
## 0.33.0
|
|
4
20
|
|
|
5
21
|
### Minor Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astrojs/starlight",
|
|
3
|
-
"version": "0.33.
|
|
3
|
+
"version": "0.33.2",
|
|
4
4
|
"description": "Build beautiful, high-performance documentation websites with Astro",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"docs",
|
|
@@ -176,22 +176,22 @@
|
|
|
176
176
|
"astro": "^5.1.5"
|
|
177
177
|
},
|
|
178
178
|
"devDependencies": {
|
|
179
|
-
"@astrojs/markdown-remark": "^6.
|
|
179
|
+
"@astrojs/markdown-remark": "^6.3.1",
|
|
180
180
|
"@playwright/test": "^1.45.0",
|
|
181
181
|
"@types/node": "^18.16.19",
|
|
182
182
|
"@vitest/coverage-v8": "^3.0.5",
|
|
183
|
-
"astro": "^5.
|
|
183
|
+
"astro": "^5.6.1",
|
|
184
184
|
"linkedom": "^0.18.4",
|
|
185
185
|
"vitest": "^3.0.5"
|
|
186
186
|
},
|
|
187
187
|
"dependencies": {
|
|
188
|
-
"@astrojs/mdx": "^4.
|
|
189
|
-
"@astrojs/sitemap": "^3.
|
|
188
|
+
"@astrojs/mdx": "^4.2.3",
|
|
189
|
+
"@astrojs/sitemap": "^3.3.0",
|
|
190
190
|
"@pagefind/default-ui": "^1.3.0",
|
|
191
191
|
"@types/hast": "^3.0.4",
|
|
192
192
|
"@types/js-yaml": "^4.0.9",
|
|
193
193
|
"@types/mdast": "^4.0.4",
|
|
194
|
-
"astro-expressive-code": "^0.
|
|
194
|
+
"astro-expressive-code": "^0.41.1",
|
|
195
195
|
"bcp-47": "^2.1.0",
|
|
196
196
|
"hast-util-from-html": "^2.0.1",
|
|
197
197
|
"hast-util-select": "^6.0.2",
|
package/utils/head.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { type HeadConfig, HeadConfigSchema, type HeadUserConfig } from '../schem
|
|
|
5
5
|
import type { PageProps, RouteDataContext } from './routing/data';
|
|
6
6
|
import { fileWithBase } from './base';
|
|
7
7
|
import { formatCanonical } from './canonical';
|
|
8
|
+
import { localizedUrl } from './localizedUrl';
|
|
8
9
|
|
|
9
10
|
const HeadSchema = HeadConfigSchema();
|
|
10
11
|
|
|
@@ -61,6 +62,28 @@ export function getHead(
|
|
|
61
62
|
},
|
|
62
63
|
];
|
|
63
64
|
|
|
65
|
+
if (description)
|
|
66
|
+
headDefaults.push({
|
|
67
|
+
tag: 'meta',
|
|
68
|
+
attrs: { name: 'description', content: description },
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
// Link to language alternates.
|
|
72
|
+
if (canonical && config.isMultilingual) {
|
|
73
|
+
for (const locale in config.locales) {
|
|
74
|
+
const localeOpts = config.locales[locale];
|
|
75
|
+
if (!localeOpts) continue;
|
|
76
|
+
headDefaults.push({
|
|
77
|
+
tag: 'link',
|
|
78
|
+
attrs: {
|
|
79
|
+
rel: 'alternate',
|
|
80
|
+
hreflang: localeOpts.lang,
|
|
81
|
+
href: localizedUrl(canonical, locale, project.trailingSlash).href,
|
|
82
|
+
},
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
64
87
|
// Link to sitemap, but only when `site` is set.
|
|
65
88
|
if (context.site) {
|
|
66
89
|
headDefaults.push({
|
package/utils/user-config.ts
CHANGED
|
@@ -51,18 +51,13 @@ const UserConfigSchema = z.object({
|
|
|
51
51
|
* Optional details about the social media accounts for this site.
|
|
52
52
|
*
|
|
53
53
|
* @example
|
|
54
|
-
* social:
|
|
55
|
-
* codeberg: 'https://codeberg.org/knut
|
|
56
|
-
* discord: 'https://astro.build/chat',
|
|
57
|
-
* github: 'https://github.com/withastro
|
|
58
|
-
* gitlab: 'https://gitlab.com/delucis',
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
* threads: 'https://www.threads.net/@nmoodev',
|
|
62
|
-
* twitch: 'https://www.twitch.tv/bholmesdev',
|
|
63
|
-
* twitter: 'https://twitter.com/astrodotbuild',
|
|
64
|
-
* youtube: 'https://youtube.com/@astrodotbuild',
|
|
65
|
-
* }
|
|
54
|
+
* social: [
|
|
55
|
+
* { icon: 'codeberg', label: 'Codeberg', href: 'https://codeberg.org/knut' },
|
|
56
|
+
* { icon: 'discord', label: 'Discord', href: 'https://astro.build/chat' },
|
|
57
|
+
* { icon: 'github', label: 'GitHub', href: 'https://github.com/withastro' },
|
|
58
|
+
* { icon: 'gitlab', label: 'GitLab', href: 'https://gitlab.com/delucis' },
|
|
59
|
+
* { icon: 'mastodon', label: 'Mastodon', href: 'https://m.webtoo.ls/@astro' },
|
|
60
|
+
* ]
|
|
66
61
|
*/
|
|
67
62
|
social: SocialLinksSchema(),
|
|
68
63
|
|