@astrojs/starlight 0.39.2 → 0.39.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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # @astrojs/starlight
2
2
 
3
+ ## 0.39.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#3910](https://github.com/withastro/starlight/pull/3910) [`dddf405`](https://github.com/withastro/starlight/commit/dddf40510a304d4ff1f137b12c07f0dafdd9c198) Thanks [@andreialba](https://github.com/andreialba)! - Improves Romanian UI translations
8
+
9
+ - [#3924](https://github.com/withastro/starlight/pull/3924) [`02f2ce1`](https://github.com/withastro/starlight/commit/02f2ce1ea2c2d814fdd2ecdd609d35109479d8cd) Thanks [@BouRock](https://github.com/BouRock)! - Improves Turkish UI translations
10
+
11
+ - [#3928](https://github.com/withastro/starlight/pull/3928) [`11a7ed2`](https://github.com/withastro/starlight/commit/11a7ed2d6ce14f131b3678f3fc13e1b16a273312) Thanks [@delucis](https://github.com/delucis)! - Updates Pagefind to v1.5 and adds support for Pagefind’s new [`diacriticSimilarity`](https://pagefind.app/docs/ranking/#configuring-diacritic-similarity) and [`metaWeights`](https://pagefind.app/docs/ranking/#configuring-metadata-weights) advanced ranking options
12
+
13
+ - [#3927](https://github.com/withastro/starlight/pull/3927) [`e944870`](https://github.com/withastro/starlight/commit/e94487041f5e22b5dc89ed8247c2bb0c737f891f) Thanks [@HiDeoo](https://github.com/HiDeoo)! - Refactors internal file path handling for Starlight content collections.
14
+
3
15
  ## 0.39.2
4
16
 
5
17
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astrojs/starlight",
3
- "version": "0.39.2",
3
+ "version": "0.39.3",
4
4
  "description": "Build beautiful, high-performance documentation websites with Astro",
5
5
  "keywords": [
6
6
  "docs",
@@ -48,7 +48,7 @@
48
48
  "@playwright/test": "^1.59.1",
49
49
  "@types/node": "^22.19.17",
50
50
  "@vitest/coverage-v8": "^4.1.5",
51
- "astro": "^6.2.2",
51
+ "astro": "^6.3.1",
52
52
  "linkedom": "^0.18.12",
53
53
  "vitest": "^4.1.5"
54
54
  },
@@ -73,7 +73,7 @@
73
73
  "mdast-util-directive": "^3.1.0",
74
74
  "mdast-util-to-markdown": "^2.1.2",
75
75
  "mdast-util-to-string": "^4.0.0",
76
- "pagefind": "^1.3.0",
76
+ "pagefind": "^1.5.2",
77
77
  "rehype": "^13.0.2",
78
78
  "rehype-format": "^5.0.1",
79
79
  "remark-directive": "^4.0.0",
@@ -88,8 +88,7 @@
88
88
  "scripts": {
89
89
  "test": "vitest",
90
90
  "test:coverage": "vitest run --coverage",
91
- "test:e2e": "pnpm test:e2e:chrome",
92
- "test:e2e:chrome": "playwright install --with-deps chromium && playwright test --project chrome",
93
- "test:e2e:firefox": "playwright install --with-deps firefox && playwright test --project firefox"
91
+ "test:e2e": "playwright install --with-deps chromium && playwright test",
92
+ "test:e2e:ci": "playwright test"
94
93
  }
95
94
  }
@@ -1,6 +1,7 @@
1
1
  import { z } from 'astro/zod';
2
2
 
3
3
  const indexWeightSchema = z.number().nonnegative().optional();
4
+
4
5
  const pagefindRankingWeightsSchema = z.object({
5
6
  /**
6
7
  * Set Pagefind’s `pageLength` ranking option.
@@ -34,7 +35,24 @@ const pagefindRankingWeightsSchema = z.object({
34
35
  * @see https://pagefind.app/docs/ranking/#configuring-term-similarity
35
36
  */
36
37
  termSimilarity: z.number().min(0).default(9),
38
+ /**
39
+ * Set Pagefind’s `diacriticSimilarity` ranking option.
40
+ *
41
+ * The default value is `0.8` and values must be greater than or equal to `0`.
42
+ *
43
+ * @see https://pagefind.app/docs/ranking/#configuring-diacritic-similarity
44
+ */
45
+ diacriticSimilarity: z.number().min(0).default(0.8),
46
+ /**
47
+ * Set Pagefind’s `metaWeights` ranking option.
48
+ *
49
+ * This is a map of metadata keys to their corresponding weights, with a default value of `{ title: 5 }`.
50
+ *
51
+ * @see https://pagefind.app/docs/ranking/#configuring-metadata-weights
52
+ */
53
+ metaWeights: z.record(z.string(), z.number().min(0)).optional(),
37
54
  });
55
+
38
56
  const pagefindIndexOptionsSchema = z.object({
39
57
  /**
40
58
  * Overrides the URL path that Pagefind uses to load its search bundle
package/style/reset.css CHANGED
@@ -28,7 +28,7 @@
28
28
  background-color: var(--sl-color-bg);
29
29
  }
30
30
 
31
- /* :lang(zh, ja) has not been supported by non-Firefox browsers at the time of writing (2026-05) */
31
+ /* :lang(zh, ja) has not been supported by Chromium-based browsers at the time of writing (2026-05) */
32
32
  [lang]:where(:lang(zh), :lang(ja)) {
33
33
  text-autospace: normal;
34
34
  }
@@ -12,19 +12,19 @@
12
12
  "menuButton.accessibleLabel": "Meniu",
13
13
  "sidebarNav.accessibleLabel": "Principal",
14
14
  "tableOfContents.onThisPage": "Pe această pagină",
15
- "tableOfContents.overview": "Sinopsis",
15
+ "tableOfContents.overview": "Cuprins",
16
16
  "i18n.untranslatedContent": "Acest conținut nu este încă disponibil în limba selectată.",
17
17
  "page.editLink": "Editează pagina",
18
18
  "page.lastUpdated": "Ultima actualizare:",
19
- "page.previousLink": "Pagina precendentă",
19
+ "page.previousLink": "Pagina precedentă",
20
20
  "page.nextLink": "Pagina următoare",
21
- "page.draft": "This content is a draft and will not be included in production builds.",
21
+ "page.draft": "Acest conținut este o schiță și nu va fi inclus în versiunile de producție.",
22
22
  "404.text": "Pagina nu a fost găsită. Verifică adresa URL sau încercă să folosești bara de căutare.",
23
23
  "aside.note": "Mențiune",
24
24
  "aside.tip": "Sfat",
25
25
  "aside.caution": "Atenție",
26
26
  "aside.danger": "Pericol",
27
- "fileTree.directory": "Directory",
28
- "builtWithStarlight.label": "Built with Starlight",
29
- "heading.anchorLabel": "Section titled {{title}}”"
27
+ "fileTree.directory": "Director",
28
+ "builtWithStarlight.label": "Creat cu Starlight",
29
+ "heading.anchorLabel": "Secțiune intitulată {{title}}”"
30
30
  }
@@ -3,7 +3,7 @@
3
3
  "search.label": "Ara",
4
4
  "search.ctrlKey": "Ctrl",
5
5
  "search.cancelLabel": "İptal",
6
- "search.devWarning": "Arama yalnızca üretim derlemelerinde kullanılabilir. \nYerel bilgisayarınızda test etmek için siteyi derleyin ve önizleme yapın.",
6
+ "search.devWarning": "Arama yalnızca üretim yapımlarında kullanılabilir. \nYerel olarak denemek için siteyi oluşturmayı ve önizlemeyi deneyin.",
7
7
  "themeSelect.accessibleLabel": "Tema seç",
8
8
  "themeSelect.dark": "Koyu",
9
9
  "themeSelect.light": "Açık",
@@ -12,19 +12,19 @@
12
12
  "menuButton.accessibleLabel": "Menü",
13
13
  "sidebarNav.accessibleLabel": "Ana",
14
14
  "tableOfContents.onThisPage": "Sayfa içeriği",
15
- "tableOfContents.overview": "Genel bakış",
15
+ "tableOfContents.overview": "Genel Bakış",
16
16
  "i18n.untranslatedContent": "Bu içerik henüz dilinizde mevcut değil.",
17
17
  "page.editLink": "Sayfayı düzenle",
18
18
  "page.lastUpdated": "Son güncelleme:",
19
19
  "page.previousLink": "Önceki",
20
20
  "page.nextLink": "Sonraki",
21
- "page.draft": "Bu içerik taslaktır ve canlı sürümde bulunmayacaktır.",
22
- "404.text": "Sayfa bulunamadı. URL'i kontrol edin ya da arama çubuğunu kullanmayı deneyin.",
21
+ "page.draft": "Bu içerik bir taslaktır ve üretim yapımlarına dahil edilmeyecektir.",
22
+ "404.text": "Sayfa bulunamadı. URL'yi gözden geçirin veya arama çubuğunu kullanmayı deneyin.",
23
23
  "aside.note": "Not",
24
24
  "aside.tip": "İpucu",
25
25
  "aside.caution": "Dikkat",
26
26
  "aside.danger": "Tehlike",
27
27
  "fileTree.directory": "Dizin",
28
- "builtWithStarlight.label": "Built with Starlight",
29
- "heading.anchorLabel": "Section titled “{{title}}”"
28
+ "builtWithStarlight.label": "Starlight ile oluşturuldu",
29
+ "heading.anchorLabel": "Bölüm başlığı “{{title}}”"
30
30
  }
@@ -15,7 +15,6 @@ export function resolveCollectionPath(collection: StarlightCollection, srcDir: U
15
15
  }
16
16
 
17
17
  export function getCollectionPosixPath(collection: StarlightCollection, srcDir: URL) {
18
- // TODO: when Astro minimum Node.js version is >= 20.13.0, refactor to use the `fileURLToPath`
19
- // second optional argument to enforce POSIX paths by setting `windows: false`.
20
- return fileURLToPath(getCollectionUrl(collection, srcDir)).replace(/\\/g, '/');
18
+ // Return POSIX path with leading slash even on Windows, e.g. `/C:/project/src/content/docs/`.
19
+ return fileURLToPath(getCollectionUrl(collection, srcDir), { windows: false });
21
20
  }