@astrojs/starlight 0.22.0 → 0.22.1
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 +6 -0
- package/package.json +1 -1
- package/utils/route-data.ts +1 -1
- package/utils/starlight-page.ts +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @astrojs/starlight
|
|
2
2
|
|
|
3
|
+
## 0.22.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`1c0fc384`](https://github.com/withastro/starlight/commit/1c0fc3849771713d5a3e7a572bdbf1483ae5551b) Thanks [@HiDeoo](https://github.com/HiDeoo)! - Fixes an issue where the `siteTitle` property would not be set when using the `<StarlightPage />` component.
|
|
8
|
+
|
|
3
9
|
## 0.22.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
package/package.json
CHANGED
package/utils/route-data.ts
CHANGED
|
@@ -111,7 +111,7 @@ function getEditUrl({ entry, id, isFallback }: PageProps): URL | undefined {
|
|
|
111
111
|
}
|
|
112
112
|
|
|
113
113
|
/** Get the site title for a given language. **/
|
|
114
|
-
function getSiteTitle(lang: string): string {
|
|
114
|
+
export function getSiteTitle(lang: string): string {
|
|
115
115
|
const defaultLang = config.defaultLocale.lang as string;
|
|
116
116
|
if (lang && config.title[lang]) {
|
|
117
117
|
return config.title[lang] as string;
|
package/utils/starlight-page.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { type ContentConfig, type SchemaContext } from 'astro:content';
|
|
|
3
3
|
import config from 'virtual:starlight/user-config';
|
|
4
4
|
import { parseWithFriendlyErrors } from './error-map';
|
|
5
5
|
import { stripLeadingAndTrailingSlashes } from './path';
|
|
6
|
-
import { getToC, type PageProps, type StarlightRouteData } from './route-data';
|
|
6
|
+
import { getSiteTitle, getToC, type PageProps, type StarlightRouteData } from './route-data';
|
|
7
7
|
import type { StarlightDocsEntry } from './routing';
|
|
8
8
|
import { slugToLocaleData, urlToSlug } from './slugs';
|
|
9
9
|
import { getPrevNextLinks, getSidebar } from './navigation';
|
|
@@ -223,6 +223,7 @@ export async function generateStarlightPageRouteData({
|
|
|
223
223
|
lastUpdated,
|
|
224
224
|
pagination: getPrevNextLinks(sidebar, config.pagination, entry.data),
|
|
225
225
|
sidebar,
|
|
226
|
+
siteTitle: getSiteTitle(localeData.lang),
|
|
226
227
|
slug,
|
|
227
228
|
toc: getToC({
|
|
228
229
|
...routeProps,
|