@hagicode/hagilight-starlight 0.2.3-dev.25.1.22dbabb → 0.2.3-dev.27.1.9f36af5
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/Footer.astro +1 -1
- package/Header.astro +2 -1
- package/locales.mjs +2 -2
- package/package.json +2 -2
package/Footer.astro
CHANGED
|
@@ -17,7 +17,7 @@ const {
|
|
|
17
17
|
rssLocaleFeedUrls,
|
|
18
18
|
} = Astro.props;
|
|
19
19
|
const currentLanguage = Astro.locals?.starlightRoute?.lang;
|
|
20
|
-
const resolvedLinks = resolveSiteLinks(locale, {
|
|
20
|
+
const resolvedLinks = resolveSiteLinks(currentLanguage ?? locale, {
|
|
21
21
|
...links,
|
|
22
22
|
...(rssFeedUrl === undefined ? {} : { rssFeedUrl }),
|
|
23
23
|
...(currentLanguage && rssLocaleFeedUrls?.[currentLanguage]
|
package/Header.astro
CHANGED
|
@@ -12,7 +12,8 @@ interface Props {
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
const { links } = Astro.props;
|
|
15
|
-
const
|
|
15
|
+
const route = Astro.locals.starlightRoute;
|
|
16
|
+
const locale = route.lang ?? route.locale;
|
|
16
17
|
const resolvedLinks = resolveSiteLinks(locale, links);
|
|
17
18
|
const shouldRenderSearch =
|
|
18
19
|
config.pagefind || config.components.Search !== '@astrojs/starlight/components/Search.astro';
|
package/locales.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export const locales = {
|
|
2
|
-
root: { label: '
|
|
3
|
-
'
|
|
2
|
+
root: { label: 'English', lang: 'en-US' },
|
|
3
|
+
'zh-cn': { label: '简体中文', lang: 'zh-CN' },
|
|
4
4
|
'zh-Hant': { label: '繁體中文', lang: 'zh-Hant' },
|
|
5
5
|
'fr-FR': { label: 'Français', lang: 'fr-FR' },
|
|
6
6
|
'de-DE': { label: 'Deutsch', lang: 'de-DE' },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hagicode/hagilight-starlight",
|
|
3
|
-
"version": "0.2.3-dev.
|
|
3
|
+
"version": "0.2.3-dev.27.1.9f36af5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Starlight customizations for HagiCode documentation",
|
|
6
6
|
"repository": {
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
],
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@astrojs/rss": "^4.0.19",
|
|
40
|
-
"@hagicode/hagilight": "0.2.3-dev.
|
|
40
|
+
"@hagicode/hagilight": "0.2.3-dev.27.1.9f36af5"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
43
|
"@astrojs/starlight": "^0.42.4",
|