@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 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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astrojs/starlight",
3
- "version": "0.22.0",
3
+ "version": "0.22.1",
4
4
  "description": "Build beautiful, high-performance documentation websites with Astro",
5
5
  "keywords": [
6
6
  "docs",
@@ -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;
@@ -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,