@astrojs/starlight 0.5.1 → 0.5.3
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 +14 -0
- package/components/MobileMenuToggle.astro +6 -0
- package/index.ts +1 -1
- package/package.json +1 -1
- package/translations/index.ts +2 -1
- package/translations/zh.json +23 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @astrojs/starlight
|
|
2
2
|
|
|
3
|
+
## 0.5.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#352](https://github.com/withastro/starlight/pull/352) [`a2e23be`](https://github.com/withastro/starlight/commit/a2e23be71d9f3592a9ac615981233bf4e9f3af6b) Thanks [@TheOtterlord](https://github.com/TheOtterlord)! - Fix page scrolling when the window resizes, while the mobile nav is open
|
|
8
|
+
|
|
9
|
+
- [#353](https://github.com/withastro/starlight/pull/353) [`65b2b75`](https://github.com/withastro/starlight/commit/65b2b7561a185be29ff7f773bf9432dc3c4da2e4) Thanks [@liruifengv](https://github.com/liruifengv)! - Add Simplified Chinese language support
|
|
10
|
+
|
|
11
|
+
## 0.5.2
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#343](https://github.com/withastro/starlight/pull/343) [`d618678`](https://github.com/withastro/starlight/commit/d618678b1901c621e1c8d2dc1a34ee299582b14e) Thanks [@delucis](https://github.com/delucis)! - Fix escaping of non-relative user config file paths for custom CSS and logos
|
|
16
|
+
|
|
3
17
|
## 0.5.1
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/index.ts
CHANGED
|
@@ -89,7 +89,7 @@ function vitePluginStarlightUserConfig(
|
|
|
89
89
|
{ root }: AstroConfig
|
|
90
90
|
): NonNullable<ViteUserConfig['plugins']>[number] {
|
|
91
91
|
const resolveRelativeId = (id: string) =>
|
|
92
|
-
id.startsWith('.') ?
|
|
92
|
+
JSON.stringify(id.startsWith('.') ? resolve(fileURLToPath(root), id) : id);
|
|
93
93
|
const modules = {
|
|
94
94
|
'virtual:starlight/user-config': `export default ${JSON.stringify(opts)}`,
|
|
95
95
|
'virtual:starlight/project-context': `export default ${JSON.stringify({
|
package/package.json
CHANGED
package/translations/index.ts
CHANGED
|
@@ -12,11 +12,12 @@ import da from './da.json';
|
|
|
12
12
|
import tr from './tr.json';
|
|
13
13
|
import ar from './ar.json';
|
|
14
14
|
import nb from './nb.json';
|
|
15
|
+
import zh from './zh.json';
|
|
15
16
|
|
|
16
17
|
const { parse } = builtinI18nSchema();
|
|
17
18
|
|
|
18
19
|
export default Object.fromEntries(
|
|
19
|
-
Object.entries({ cs, en, es, de, ja, pt, fr, it, nl, da, tr, ar, nb }).map(([key, dict]) => [
|
|
20
|
+
Object.entries({ cs, en, es, de, ja, pt, fr, it, nl, da, tr, ar, nb, zh }).map(([key, dict]) => [
|
|
20
21
|
key,
|
|
21
22
|
parse(dict),
|
|
22
23
|
])
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"skipLink.label": "跳转到内容",
|
|
3
|
+
"search.label": "搜索",
|
|
4
|
+
"search.shortcutLabel": "(按 / 进行搜索)",
|
|
5
|
+
"search.cancelLabel": "取消",
|
|
6
|
+
"search.devWarning": "搜索仅适用于生产版本。\n尝试构建并预览网站以在本地测试。",
|
|
7
|
+
"themeSelect.accessibleLabel": "选择主题",
|
|
8
|
+
"themeSelect.dark": "深色",
|
|
9
|
+
"themeSelect.light": "浅色",
|
|
10
|
+
"themeSelect.auto": "自动",
|
|
11
|
+
"languageSelect.accessibleLabel": "选择语言",
|
|
12
|
+
"menuButton.accessibleLabel": "菜单",
|
|
13
|
+
"sidebarNav.accessibleLabel": "主要",
|
|
14
|
+
"tableOfContents.onThisPage": "本页",
|
|
15
|
+
"tableOfContents.overview": "概述",
|
|
16
|
+
"i18n.untranslatedContent": "此内容尚不支持你的语言。",
|
|
17
|
+
"page.editLink": "编辑此页",
|
|
18
|
+
"page.lastUpdated": "最近更新:",
|
|
19
|
+
"page.previousLink": "上一页",
|
|
20
|
+
"page.nextLink": "下一页",
|
|
21
|
+
"404.text": "页面未找到。检查 URL 或尝试使用搜索栏。"
|
|
22
|
+
}
|
|
23
|
+
|