@astrojs/starlight 0.32.0 → 0.32.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 +14 -0
- package/locals.ts +1 -0
- package/package.json +1 -1
- package/translations/index.ts +2 -0
- package/translations/lv.json +29 -0
- package/utils/navigation.ts +6 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @astrojs/starlight
|
|
2
2
|
|
|
3
|
+
## 0.32.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#2926](https://github.com/withastro/starlight/pull/2926) [`c0170fd`](https://github.com/withastro/starlight/commit/c0170fd240a89ba4d0d4dd09817257903743dbe8) Thanks [@resoltico](https://github.com/resoltico)! - Adds Latvian language support
|
|
8
|
+
|
|
9
|
+
- [#2918](https://github.com/withastro/starlight/pull/2918) [`790c000`](https://github.com/withastro/starlight/commit/790c000c4761f68b2782f1eef74568f210d4c619) Thanks [@HiDeoo](https://github.com/HiDeoo)! - Fixes a trailing slash inconsistency in generated sidebar links when using the [`trailingSlash: 'ignore'`](https://docs.astro.build/en/reference/configuration-reference/#trailingslash) Astro option (the default) between [internal](https://starlight.astro.build/guides/sidebar/#internal-links) and [auto-generated](https://starlight.astro.build/guides/sidebar/#autogenerated-groups) links. Starlight behavior for this configuration value is to use a trailing slash as many common hosting providers redirect to URLs with a trailing slash by default.
|
|
10
|
+
|
|
11
|
+
## 0.32.1
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#2904](https://github.com/withastro/starlight/pull/2904) [`ec5ca59`](https://github.com/withastro/starlight/commit/ec5ca5953e62b6ad2de78996d37e08522aa4aa76) Thanks [@HiDeoo](https://github.com/HiDeoo)! - Fixes an issue preventing the use of [rewrites](https://docs.astro.build/en/guides/routing/#rewrites).
|
|
16
|
+
|
|
3
17
|
## 0.32.0
|
|
4
18
|
|
|
5
19
|
### Minor Changes
|
package/locals.ts
CHANGED
|
@@ -20,6 +20,7 @@ export const onRequest = defineMiddleware(async (context, next) => {
|
|
|
20
20
|
* avoid generating route data in this middleware which also runs for non-Starlight route.
|
|
21
21
|
*/
|
|
22
22
|
export function initializeStarlightRoute(context: APIContext) {
|
|
23
|
+
if ('starlightRoute' in context.locals) return;
|
|
23
24
|
const state: { routeData: StarlightRouteData | undefined } = { routeData: undefined };
|
|
24
25
|
Object.defineProperty(context.locals, 'starlightRoute', {
|
|
25
26
|
get() {
|
package/package.json
CHANGED
package/translations/index.ts
CHANGED
|
@@ -28,6 +28,7 @@ import hi from './hi.json';
|
|
|
28
28
|
import zhTW from './zh-TW.json';
|
|
29
29
|
import pl from './pl.json';
|
|
30
30
|
import sk from './sk.json';
|
|
31
|
+
import lv from './lv.json';
|
|
31
32
|
|
|
32
33
|
const { parse } = builtinI18nSchema();
|
|
33
34
|
|
|
@@ -62,5 +63,6 @@ export default Object.fromEntries(
|
|
|
62
63
|
'zh-TW': zhTW,
|
|
63
64
|
pl,
|
|
64
65
|
sk,
|
|
66
|
+
lv,
|
|
65
67
|
}).map(([key, dict]) => [key, parse(dict)])
|
|
66
68
|
);
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"skipLink.label": "Pāriet uz saturu",
|
|
3
|
+
"search.label": "Meklēt",
|
|
4
|
+
"search.ctrlKey": "Ctrl",
|
|
5
|
+
"search.cancelLabel": "Atcelt",
|
|
6
|
+
"search.devWarning": "Meklēšana ir pieejama tikai ražošanas kompilācijās. \nMēģiniet kompilēt un priekšskatīt vietni, lai to pārbaudītu lokāli.",
|
|
7
|
+
"themeSelect.accessibleLabel": "Izvēlieties tēmu",
|
|
8
|
+
"themeSelect.dark": "Tumša",
|
|
9
|
+
"themeSelect.light": "Gaiša",
|
|
10
|
+
"themeSelect.auto": "Automātiska",
|
|
11
|
+
"languageSelect.accessibleLabel": "Izvēlieties valodu",
|
|
12
|
+
"menuButton.accessibleLabel": "Izvēlne",
|
|
13
|
+
"sidebarNav.accessibleLabel": "Galvenā",
|
|
14
|
+
"tableOfContents.onThisPage": "Šajā lapā",
|
|
15
|
+
"tableOfContents.overview": "Pārskats",
|
|
16
|
+
"i18n.untranslatedContent": "Šis saturs vēl nav pieejams jūsu valodā.",
|
|
17
|
+
"page.editLink": "Rediģēt lapu",
|
|
18
|
+
"page.lastUpdated": "Pēdējoreiz atjaunināts:",
|
|
19
|
+
"page.previousLink": "Iepriekšējā",
|
|
20
|
+
"page.nextLink": "Nākamā",
|
|
21
|
+
"page.draft": "Šis saturs ir melnraksts un netiks iekļauts ražošanas kompilācijās.",
|
|
22
|
+
"404.text": "Lapa nav atrasta. Pārbaudiet URL vai mēģiniet izmantot meklēšanas joslu.",
|
|
23
|
+
"aside.note": "Piezīme",
|
|
24
|
+
"aside.tip": "Padoms",
|
|
25
|
+
"aside.caution": "Uzmanību",
|
|
26
|
+
"aside.danger": "Bīstamība",
|
|
27
|
+
"fileTree.directory": "Direktorija",
|
|
28
|
+
"builtWithStarlight.label": "Veidots ar Starlight"
|
|
29
|
+
}
|
package/utils/navigation.ts
CHANGED
|
@@ -165,7 +165,12 @@ function linkFromInternalSidebarLinkItem(
|
|
|
165
165
|
frontmatter.title;
|
|
166
166
|
const badge = item.badge ?? frontmatter.sidebar?.badge;
|
|
167
167
|
const attrs = { ...frontmatter.sidebar?.attrs, ...item.attrs };
|
|
168
|
-
return makeSidebarLink(
|
|
168
|
+
return makeSidebarLink(
|
|
169
|
+
slugToPathname(route.slug),
|
|
170
|
+
label,
|
|
171
|
+
getSidebarBadge(badge, locale, label),
|
|
172
|
+
attrs
|
|
173
|
+
);
|
|
169
174
|
}
|
|
170
175
|
|
|
171
176
|
/** Process sidebar link options to create a link entry. */
|