@astrojs/starlight 0.11.0 → 0.11.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 +32 -0
- package/components/Icons.ts +29 -25
- package/components/MarkdownContent.astro +2 -2
- package/components/MobileTableOfContents.astro +1 -0
- package/components/Pagination.astro +8 -2
- package/package.json +2 -2
- package/schemas/sidebar.ts +2 -1
- package/schemas/social.ts +29 -23
- package/translations/id.json +1 -1
- package/translations/index.ts +3 -1
- package/translations/ru.json +2 -2
- package/translations/uk.json +22 -0
- package/utils/route-data.ts +5 -3
- package/utils/user-config.ts +0 -1
- /package/translations/{zh.json → zh-CN.json} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,37 @@
|
|
|
1
1
|
# @astrojs/starlight
|
|
2
2
|
|
|
3
|
+
## 0.11.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#944](https://github.com/withastro/starlight/pull/944) [`7a6446e`](https://github.com/withastro/starlight/commit/7a6446ebc61ba9cc36d1dcfd13db15c1533751ab) Thanks [@HiDeoo](https://github.com/HiDeoo)! - Fix issue with sidebar autogenerated groups configured with a directory containing leading or trailing slash
|
|
8
|
+
|
|
9
|
+
- [#985](https://github.com/withastro/starlight/pull/985) [`92b3b57`](https://github.com/withastro/starlight/commit/92b3b575404d0dc34f720c0ba29d8ed50be98f58) Thanks [@delucis](https://github.com/delucis)! - Fix edit URLs for pages displaying fallback content
|
|
10
|
+
|
|
11
|
+
- [#986](https://github.com/withastro/starlight/pull/986) [`0470734`](https://github.com/withastro/starlight/commit/0470734e0dc323f9945e06bee4338c2f777ba0d6) Thanks [@dreyfus92](https://github.com/dreyfus92)! - Prevent overscrolling on mobile table of contents by setting 'overscroll-behavior: contain'.
|
|
12
|
+
|
|
13
|
+
- [#924](https://github.com/withastro/starlight/pull/924) [`39d6302`](https://github.com/withastro/starlight/commit/39d6302db42ee1105d690bbd3a66053e6b21e15a) Thanks [@kevinzunigacuellar](https://github.com/kevinzunigacuellar)! - Remove extra margin from markdown lists that uses inline code
|
|
14
|
+
|
|
15
|
+
- [#814](https://github.com/withastro/starlight/pull/814) [`1e517d9`](https://github.com/withastro/starlight/commit/1e517d92a4cf146d2dcae58f7c4299d6f25ea73e) Thanks [@julien-deramond](https://github.com/julien-deramond)! - Prevent text from overflowing pagination items
|
|
16
|
+
|
|
17
|
+
## 0.11.1
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- [#892](https://github.com/withastro/starlight/pull/892) [`2b30321`](https://github.com/withastro/starlight/commit/2b30321bde801bb9945d73dc954e25b40f4324fa) Thanks [@delucis](https://github.com/delucis)! - Add Patreon social link icon
|
|
22
|
+
|
|
23
|
+
- [#854](https://github.com/withastro/starlight/pull/854) [`71a52a1`](https://github.com/withastro/starlight/commit/71a52a16c44e3568128c83070541235133c44436) Thanks [@mehalter](https://github.com/mehalter)! - Add Reddit icon
|
|
24
|
+
|
|
25
|
+
- [#852](https://github.com/withastro/starlight/pull/852) [`344c92e`](https://github.com/withastro/starlight/commit/344c92e1b8bca5f92ec087df6cccf5c611eefdff) Thanks [@Lootjs](https://github.com/Lootjs)! - Improve Russian language support
|
|
26
|
+
|
|
27
|
+
- [#891](https://github.com/withastro/starlight/pull/891) [`395920c`](https://github.com/withastro/starlight/commit/395920c46e7b24cfff31800b3426ab375078e5c1) Thanks [@Frikadellios](https://github.com/Frikadellios)! - Add Ukrainian language support
|
|
28
|
+
|
|
29
|
+
- [#890](https://github.com/withastro/starlight/pull/890) [`63ea8e8`](https://github.com/withastro/starlight/commit/63ea8e86643b050c6be6f9a6167f6642b039c709) Thanks [@delucis](https://github.com/delucis)! - Update `execa` dependency to v8
|
|
30
|
+
|
|
31
|
+
- [#859](https://github.com/withastro/starlight/pull/859) [`eaa7a90`](https://github.com/withastro/starlight/commit/eaa7a902c7b7638b326709fd5203d932b20ed3fa) Thanks [@oggnimodd](https://github.com/oggnimodd)! - Improve Indonesian language support
|
|
32
|
+
|
|
33
|
+
- [#864](https://github.com/withastro/starlight/pull/864) [`b84aff2`](https://github.com/withastro/starlight/commit/b84aff2b9cccbc35c8619763c7f36841abe6344b) Thanks [@mehalter](https://github.com/mehalter)! - Optimize UI icon SVG paths
|
|
34
|
+
|
|
3
35
|
## 0.11.0
|
|
4
36
|
|
|
5
37
|
### Minor Changes
|
package/components/Icons.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
export const Icons = {
|
|
2
2
|
'up-caret':
|
|
3
|
-
'<path d="
|
|
3
|
+
'<path d="m17 13.41-4.29-4.24a.999.999 0 0 0-1.42 0l-4.24 4.24a1 1 0 1 0 1.41 1.42L12 11.29l3.54 3.54a1 1 0 0 0 1.41 0 1 1 0 0 0 .05-1.42Z"/>',
|
|
4
4
|
'down-caret':
|
|
5
|
-
'<path d="M17 9.
|
|
5
|
+
'<path d="M17 9.17a1 1 0 0 0-1.41 0L12 12.71 8.46 9.17a1 1 0 1 0-1.41 1.42l4.24 4.24a1.002 1.002 0 0 0 1.42 0L17 10.59a1.002 1.002 0 0 0 0-1.42Z"/>',
|
|
6
6
|
'right-caret':
|
|
7
|
-
'<path d="
|
|
7
|
+
'<path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z"/>',
|
|
8
8
|
'right-arrow':
|
|
9
|
-
'<path d="M17.92 11.
|
|
9
|
+
'<path d="M17.92 11.62a1.001 1.001 0 0 0-.21-.33l-5-5a1.003 1.003 0 1 0-1.42 1.42l3.3 3.29H7a1 1 0 0 0 0 2h7.59l-3.3 3.29a1.002 1.002 0 0 0 .325 1.639 1 1 0 0 0 1.095-.219l5-5a1 1 0 0 0 .21-.33 1 1 0 0 0 0-.76Z"/>',
|
|
10
10
|
'left-arrow':
|
|
11
|
-
'<path d="M17 11H9.
|
|
12
|
-
bars: '<path d="M3
|
|
11
|
+
'<path d="M17 11H9.41l3.3-3.29a1.004 1.004 0 1 0-1.42-1.42l-5 5a1 1 0 0 0-.21.33 1 1 0 0 0 0 .76 1 1 0 0 0 .21.33l5 5a1.002 1.002 0 0 0 1.639-.325 1 1 0 0 0-.219-1.095L9.41 13H17a1 1 0 0 0 0-2Z"/>',
|
|
12
|
+
bars: '<path d="M3 8h18a1 1 0 1 0 0-2H3a1 1 0 0 0 0 2Zm18 8H3a1 1 0 0 0 0 2h18a1 1 0 0 0 0-2Zm0-5H3a1 1 0 0 0 0 2h18a1 1 0 0 0 0-2Z"/>',
|
|
13
13
|
translate:
|
|
14
|
-
'<path fill-rule="evenodd"
|
|
14
|
+
'<path fill-rule="evenodd" d="M8.516 3a.94.94 0 0 0-.941.94v1.15H2.94a.94.94 0 1 0 0 1.882h7.362a7.422 7.422 0 0 1-1.787 3.958 7.42 7.42 0 0 1-1.422-2.425.94.94 0 1 0-1.774.627 9.303 9.303 0 0 0 1.785 3.043 7.422 7.422 0 0 1-4.164 1.278.94.94 0 1 0 0 1.881 9.303 9.303 0 0 0 5.575-1.855 9.303 9.303 0 0 0 4.11 1.74l-.763 1.525a.968.968 0 0 0-.016.034l-1.385 2.77a.94.94 0 1 0 1.683.841l1.133-2.267h5.806l1.134 2.267a.94.94 0 0 0 1.683-.841l-1.385-2.769a.95.95 0 0 0-.018-.036l-3.476-6.951a.94.94 0 0 0-1.682 0l-1.82 3.639a7.423 7.423 0 0 1-3.593-1.256 9.303 9.303 0 0 0 2.27-5.203h1.894a.94.94 0 0 0 0-1.881H9.456V3.94A.94.94 0 0 0 8.516 3Zm6.426 11.794a1.068 1.068 0 0 1-.02.039l-.703 1.407h3.924l-1.962-3.924-1.24 2.478Z" clip-rule="evenodd"/>',
|
|
15
15
|
pencil:
|
|
16
16
|
'<path d="M22 7.24a1 1 0 0 0-.29-.71l-4.24-4.24a1 1 0 0 0-1.1-.22 1 1 0 0 0-.32.22l-2.83 2.83L2.29 16.05a1 1 0 0 0-.29.71V21a1 1 0 0 0 1 1h4.24a1 1 0 0 0 .76-.29l10.87-10.93L21.71 8c.1-.1.17-.2.22-.33a1 1 0 0 0 0-.24v-.14l.07-.05ZM6.83 20H4v-2.83l9.93-9.93 2.83 2.83L6.83 20ZM18.17 8.66l-2.83-2.83 1.42-1.41 2.82 2.82-1.41 1.42Z"/>',
|
|
17
17
|
pen: '<path d="M21 12a1 1 0 0 0-1 1v6a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h6a1 1 0 1 0 0-2H5a3 3 0 0 0-3 3v14a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3v-6a1 1 0 0 0-1-1Zm-15 .76V17a1 1 0 0 0 1 1h4.24a1 1 0 0 0 .71-.29l6.92-6.93L21.71 8a1 1 0 0 0 0-1.42l-4.24-4.29a1 1 0 0 0-1.42 0l-2.82 2.83-6.94 6.93a1 1 0 0 0-.29.71Zm10.76-8.35 2.83 2.83-1.42 1.42-2.83-2.83 1.42-1.42ZM8 13.17l5.93-5.93 2.83 2.83L10.83 16H8v-2.83Z"/>',
|
|
@@ -23,35 +23,35 @@ export const Icons = {
|
|
|
23
23
|
'<path d="m21.32 9.55-1.89-.63.89-1.78A1 1 0 0 0 20.13 6L18 3.87a1 1 0 0 0-1.15-.19l-1.78.89-.63-1.89A1 1 0 0 0 13.5 2h-3a1 1 0 0 0-.95.68l-.63 1.89-1.78-.89A1 1 0 0 0 6 3.87L3.87 6a1 1 0 0 0-.19 1.15l.89 1.78-1.89.63a1 1 0 0 0-.68.94v3a1 1 0 0 0 .68.95l1.89.63-.89 1.78A1 1 0 0 0 3.87 18L6 20.13a1 1 0 0 0 1.15.19l1.78-.89.63 1.89a1 1 0 0 0 .95.68h3a1 1 0 0 0 .95-.68l.63-1.89 1.78.89a1 1 0 0 0 1.13-.19L20.13 18a1 1 0 0 0 .19-1.15l-.89-1.78 1.89-.63a1 1 0 0 0 .68-.94v-3a1 1 0 0 0-.68-.95ZM20 12.78l-1.2.4A2 2 0 0 0 17.64 16l.57 1.14-1.1 1.1-1.11-.6a2 2 0 0 0-2.79 1.16l-.4 1.2h-1.59l-.4-1.2A2 2 0 0 0 8 17.64l-1.14.57-1.1-1.1.6-1.11a2 2 0 0 0-1.16-2.82l-1.2-.4v-1.56l1.2-.4A2 2 0 0 0 6.36 8l-.57-1.11 1.1-1.1L8 6.36a2 2 0 0 0 2.82-1.16l.4-1.2h1.56l.4 1.2A2 2 0 0 0 16 6.36l1.14-.57 1.1 1.1-.6 1.11a2 2 0 0 0 1.16 2.79l1.2.4v1.59ZM12 8a4 4 0 1 0 0 8 4 4 0 0 0 0-8Zm0 6a2 2 0 1 1 0-4 2 2 0 0 1 0 4Z"/>',
|
|
24
24
|
external:
|
|
25
25
|
'<path d="M19.33 10.18a1 1 0 0 1-.77 0 1 1 0 0 1-.62-.93l.01-1.83-8.2 8.2a1 1 0 0 1-1.41-1.42l8.2-8.2H14.7a1 1 0 0 1 0-2h4.25a1 1 0 0 1 1 1v4.25a1 1 0 0 1-.62.93Z"/><path d="M11 4a1 1 0 1 1 0 2H7a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1v-4a1 1 0 1 1 2 0v4a3 3 0 0 1-3 3H7a3 3 0 0 1-3-3V7a3 3 0 0 1 3-3h4Z"/>',
|
|
26
|
-
moon: '<path d="M21.64
|
|
27
|
-
sun: '<path d="M5
|
|
26
|
+
moon: '<path d="M21.64 13a1 1 0 0 0-1.05-.14 8.049 8.049 0 0 1-3.37.73 8.15 8.15 0 0 1-8.14-8.1 8.59 8.59 0 0 1 .25-2A1 1 0 0 0 8 2.36a10.14 10.14 0 1 0 14 11.69 1 1 0 0 0-.36-1.05Zm-9.5 6.69A8.14 8.14 0 0 1 7.08 5.22v.27a10.15 10.15 0 0 0 10.14 10.14 9.784 9.784 0 0 0 2.1-.22 8.11 8.11 0 0 1-7.18 4.32v-.04Z"/>',
|
|
27
|
+
sun: '<path d="M5 12a1 1 0 0 0-1-1H3a1 1 0 0 0 0 2h1a1 1 0 0 0 1-1Zm.64 5-.71.71a1 1 0 0 0 0 1.41 1 1 0 0 0 1.41 0l.71-.71A1 1 0 0 0 5.64 17ZM12 5a1 1 0 0 0 1-1V3a1 1 0 0 0-2 0v1a1 1 0 0 0 1 1Zm5.66 2.34a1 1 0 0 0 .7-.29l.71-.71a1 1 0 1 0-1.41-1.41l-.66.71a1 1 0 0 0 0 1.41 1 1 0 0 0 .66.29Zm-12-.29a1 1 0 0 0 1.41 0 1 1 0 0 0 0-1.41l-.71-.71a1.004 1.004 0 1 0-1.43 1.41l.73.71ZM21 11h-1a1 1 0 0 0 0 2h1a1 1 0 0 0 0-2Zm-2.64 6A1 1 0 0 0 17 18.36l.71.71a1 1 0 0 0 1.41 0 1 1 0 0 0 0-1.41l-.76-.66ZM12 6.5a5.5 5.5 0 1 0 5.5 5.5A5.51 5.51 0 0 0 12 6.5Zm0 9a3.5 3.5 0 1 1 0-7 3.5 3.5 0 0 1 0 7Zm0 3.5a1 1 0 0 0-1 1v1a1 1 0 0 0 2 0v-1a1 1 0 0 0-1-1Z"/>',
|
|
28
28
|
laptop:
|
|
29
|
-
'<path d="M21
|
|
29
|
+
'<path d="M21 14h-1V7a3 3 0 0 0-3-3H7a3 3 0 0 0-3 3v7H3a1 1 0 0 0-1 1v2a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3v-2a1 1 0 0 0-1-1ZM6 7a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v7H6V7Zm14 10a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-1h16v1Z"/>',
|
|
30
30
|
'open-book':
|
|
31
|
-
'<path d="M21.17 2.
|
|
31
|
+
'<path d="M21.17 2.06A13.1 13.1 0 0 0 19 1.87a12.94 12.94 0 0 0-7 2.05 12.94 12.94 0 0 0-7-2 13.1 13.1 0 0 0-2.17.19 1 1 0 0 0-.83 1v12a1 1 0 0 0 1.17 1 10.9 10.9 0 0 1 8.25 1.91l.12.07h.11a.91.91 0 0 0 .7 0h.11l.12-.07A10.899 10.899 0 0 1 20.83 16 1 1 0 0 0 22 15V3a1 1 0 0 0-.83-.94ZM11 15.35a12.87 12.87 0 0 0-6-1.48H4v-10c.333-.02.667-.02 1 0a10.86 10.86 0 0 1 6 1.8v9.68Zm9-1.44h-1a12.87 12.87 0 0 0-6 1.48V5.67a10.86 10.86 0 0 1 6-1.8c.333-.02.667-.02 1 0v10.04Zm1.17 4.15a13.098 13.098 0 0 0-2.17-.19 12.94 12.94 0 0 0-7 2.05 12.94 12.94 0 0 0-7-2.05c-.727.003-1.453.066-2.17.19A1 1 0 0 0 2 19.21a1 1 0 0 0 1.17.79 10.9 10.9 0 0 1 8.25 1.91 1 1 0 0 0 1.16 0A10.9 10.9 0 0 1 20.83 20a1 1 0 0 0 1.17-.79 1 1 0 0 0-.83-1.15Z"/>',
|
|
32
32
|
information:
|
|
33
|
-
'<path d="M12
|
|
33
|
+
'<path d="M12 11a1 1 0 0 0-1 1v4a1 1 0 0 0 2 0v-4a1 1 0 0 0-1-1Zm.38-3.92a1 1 0 0 0-.76 0 1 1 0 0 0-.33.21 1.15 1.15 0 0 0-.21.33 1 1 0 0 0 .21 1.09c.097.088.209.16.33.21A1 1 0 0 0 13 8a1.05 1.05 0 0 0-.29-.71 1 1 0 0 0-.33-.21ZM12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm0 18a8 8 0 1 1 0-16.001A8 8 0 0 1 12 20Z"/>',
|
|
34
34
|
magnifier:
|
|
35
|
-
'<path d="M21.71 20.
|
|
35
|
+
'<path d="M21.71 20.29 18 16.61A9 9 0 1 0 16.61 18l3.68 3.68a.999.999 0 0 0 1.42 0 1 1 0 0 0 0-1.39ZM11 18a7 7 0 1 1 0-14 7 7 0 0 1 0 14Z"/>',
|
|
36
36
|
'forward-slash':
|
|
37
|
-
'<path d="M17
|
|
37
|
+
'<path d="M17 2H7a5 5 0 0 0-5 5v10a5 5 0 0 0 5 5h10a5 5 0 0 0 5-5V7a5 5 0 0 0-5-5Zm3 15a3 3 0 0 1-3 3H7a3 3 0 0 1-3-3V7a3 3 0 0 1 3-3h10a3 3 0 0 1 3 3v10Z"/><path d="M15.293 6.707a1 1 0 1 1 1.414 1.414l-8.485 8.486a1 1 0 0 1-1.414-1.415l8.485-8.485Z"/>',
|
|
38
38
|
close:
|
|
39
|
-
'<path d="
|
|
39
|
+
'<path d="m13.41 12 6.3-6.29a1.004 1.004 0 1 0-1.42-1.42L12 10.59l-6.29-6.3a1.004 1.004 0 0 0-1.42 1.42l6.3 6.29-6.3 6.29a1 1 0 0 0 0 1.42.998.998 0 0 0 1.42 0l6.29-6.3 6.29 6.3a.999.999 0 0 0 1.42 0 1 1 0 0 0 0-1.42L13.41 12Z"/>',
|
|
40
40
|
error:
|
|
41
|
-
'<path d="M12
|
|
41
|
+
'<path d="M12 7a1 1 0 0 0-1 1v4a1 1 0 0 0 2 0V8a1 1 0 0 0-1-1Zm0 8a1 1 0 1 0 0 2 1 1 0 0 0 0-2Zm9.71-7.44-5.27-5.27a1.05 1.05 0 0 0-.71-.29H8.27a1.05 1.05 0 0 0-.71.29L2.29 7.56a1.05 1.05 0 0 0-.29.71v7.46c.004.265.107.518.29.71l5.27 5.27c.192.183.445.286.71.29h7.46a1.05 1.05 0 0 0 .71-.29l5.27-5.27a1.05 1.05 0 0 0 .29-.71V8.27a1.05 1.05 0 0 0-.29-.71ZM20 15.31 15.31 20H8.69L4 15.31V8.69L8.69 4h6.62L20 8.69v6.62Z"/>',
|
|
42
42
|
warning:
|
|
43
|
-
'<path d="M12
|
|
43
|
+
'<path d="M12 16a1 1 0 1 0 0 2 1 1 0 0 0 0-2Zm10.67 1.47-8.05-14a3 3 0 0 0-5.24 0l-8 14A3 3 0 0 0 3.94 22h16.12a3 3 0 0 0 2.61-4.53Zm-1.73 2a1 1 0 0 1-.88.51H3.94a1 1 0 0 1-.88-.51 1 1 0 0 1 0-1l8-14a1 1 0 0 1 1.78 0l8.05 14a1 1 0 0 1 .05 1.02v-.02ZM12 8a1 1 0 0 0-1 1v4a1 1 0 0 0 2 0V9a1 1 0 0 0-1-1Z"/>',
|
|
44
44
|
'approve-check-circle':
|
|
45
|
-
'<path d="
|
|
45
|
+
'<path d="m14.72 8.79-4.29 4.3-1.65-1.65a1 1 0 1 0-1.41 1.41l2.35 2.36a1 1 0 0 0 1.41 0l5-5a1.002 1.002 0 1 0-1.41-1.42ZM12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm0 18a8 8 0 1 1 0-16.001A8 8 0 0 1 12 20Z"/>',
|
|
46
46
|
'approve-check':
|
|
47
|
-
'<path d="M18.71 7.
|
|
47
|
+
'<path d="M18.71 7.21a1 1 0 0 0-1.42 0l-7.45 7.46-3.13-3.14A1.02 1.02 0 1 0 5.29 13l3.84 3.84a1.001 1.001 0 0 0 1.42 0l8.16-8.16a1 1 0 0 0 0-1.47Z"/>',
|
|
48
48
|
rocket:
|
|
49
|
-
'<path fill-rule="evenodd"
|
|
49
|
+
'<path fill-rule="evenodd" d="M1.44 8.855v-.001l3.527-3.516c.34-.344.802-.541 1.285-.548h6.649l.947-.947c3.07-3.07 6.207-3.072 7.62-2.868a1.821 1.821 0 0 1 1.557 1.557c.204 1.413.203 4.55-2.868 7.62l-.946.946v6.649a1.845 1.845 0 0 1-.549 1.286l-3.516 3.528a1.844 1.844 0 0 1-3.11-.944l-.858-4.275-4.52-4.52-2.31-.463-1.964-.394A1.847 1.847 0 0 1 .98 10.693a1.843 1.843 0 0 1 .46-1.838Zm5.379 2.017-3.873-.776L6.32 6.733h4.638l-4.14 4.14Zm8.403-5.655c2.459-2.46 4.856-2.463 5.89-2.33.134 1.035.13 3.432-2.329 5.891l-6.71 6.71-3.561-3.56 6.71-6.711Zm-1.318 15.837-.776-3.873 4.14-4.14v4.639l-3.364 3.374Z" clip-rule="evenodd"/><path d="M9.318 18.345a.972.972 0 0 0-1.86-.561c-.482 1.435-1.687 2.204-2.934 2.619a8.22 8.22 0 0 1-1.23.302c.062-.365.157-.79.303-1.229.415-1.247 1.184-2.452 2.62-2.935a.971.971 0 1 0-.62-1.842c-.12.04-.236.084-.35.13-2.02.828-3.012 2.588-3.493 4.033a10.383 10.383 0 0 0-.51 2.845l-.001.016v.063c0 .536.434.972.97.972H2.24a7.21 7.21 0 0 0 .878-.065c.527-.063 1.248-.19 2.02-.447 1.445-.48 3.205-1.472 4.033-3.494a5.828 5.828 0 0 0 .147-.407Z"/>',
|
|
50
50
|
star: '<path d="M22 9.67a1 1 0 0 0-.86-.67l-5.69-.83L12.9 3a1 1 0 0 0-1.8 0L8.55 8.16 2.86 9a1 1 0 0 0-.81.68 1 1 0 0 0 .25 1l4.13 4-1 5.68a1 1 0 0 0 1.45 1.07L12 18.76l5.1 2.68c.14.08.3.12.46.12a1 1 0 0 0 .99-1.19l-1-5.68 4.13-4A1 1 0 0 0 22 9.67Zm-6.15 4a1 1 0 0 0-.29.89l.72 4.19-3.76-2a1 1 0 0 0-.94 0l-3.76 2 .72-4.19a1 1 0 0 0-.29-.89l-3-3 4.21-.61a1 1 0 0 0 .76-.55L12 5.7l1.88 3.82a1 1 0 0 0 .76.55l4.21.61-3 2.99Z"/>',
|
|
51
51
|
puzzle:
|
|
52
52
|
'<path d="M17 22H5a3 3 0 0 1-3-3V9a3 3 0 0 1 3-3h1a4 4 0 0 1 7.3-2.18c.448.64.692 1.4.7 2.18h3a1 1 0 0 1 1 1v3a4 4 0 0 1 2.18 7.3A3.86 3.86 0 0 1 18 18v3a1 1 0 0 1-1 1ZM5 8a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h11v-3.18a1 1 0 0 1 1.33-.95 1.77 1.77 0 0 0 1.74-.23 2 2 0 0 0 .93-1.37 2 2 0 0 0-.48-1.59 1.89 1.89 0 0 0-2.17-.55 1 1 0 0 1-1.33-.95V8h-3.2a1 1 0 0 1-1-1.33 1.77 1.77 0 0 0-.23-1.74 1.939 1.939 0 0 0-3-.43A2 2 0 0 0 8 6c.002.23.046.456.13.67A1 1 0 0 1 7.18 8H5Z"/>',
|
|
53
53
|
'list-format':
|
|
54
|
-
'<path d="M3.71 16.
|
|
54
|
+
'<path d="M3.71 16.29a1 1 0 0 0-.33-.21 1 1 0 0 0-.76 0 1 1 0 0 0-.33.21 1 1 0 0 0-.21.33 1 1 0 0 0 .21 1.09c.097.088.209.16.33.21a.94.94 0 0 0 .76 0 1.15 1.15 0 0 0 .33-.21 1 1 0 0 0 .21-1.09 1 1 0 0 0-.21-.33ZM7 8h14a1 1 0 1 0 0-2H7a1 1 0 0 0 0 2Zm-3.29 3.29a1 1 0 0 0-1.09-.21 1.15 1.15 0 0 0-.33.21 1 1 0 0 0-.21.33.94.94 0 0 0 0 .76c.05.121.122.233.21.33.097.088.209.16.33.21a.94.94 0 0 0 .76 0 1.15 1.15 0 0 0 .33-.21 1.15 1.15 0 0 0 .21-.33.94.94 0 0 0 0-.76 1 1 0 0 0-.21-.33ZM21 11H7a1 1 0 0 0 0 2h14a1 1 0 0 0 0-2ZM3.71 6.29a1 1 0 0 0-.33-.21 1 1 0 0 0-1.09.21 1.15 1.15 0 0 0-.21.33.94.94 0 0 0 0 .76c.05.121.122.233.21.33.097.088.209.16.33.21a1 1 0 0 0 1.09-.21 1.15 1.15 0 0 0 .21-.33.94.94 0 0 0 0-.76 1.15 1.15 0 0 0-.21-.33ZM21 16H7a1 1 0 0 0 0 2h14a1 1 0 0 0 0-2Z"/>',
|
|
55
55
|
random:
|
|
56
56
|
'<path d="M8.7 10a1 1 0 0 0 1.41 0 1 1 0 0 0 0-1.41l-6.27-6.3a1 1 0 0 0-1.42 1.42ZM21 14a1 1 0 0 0-1 1v3.59L15.44 14A1 1 0 0 0 14 15.44L18.59 20H15a1 1 0 0 0 0 2h6a1 1 0 0 0 .38-.08 1 1 0 0 0 .54-.54A1 1 0 0 0 22 21v-6a1 1 0 0 0-1-1Zm.92-11.38a1 1 0 0 0-.54-.54A1 1 0 0 0 21 2h-6a1 1 0 0 0 0 2h3.59L2.29 20.29a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0L20 5.41V9a1 1 0 0 0 2 0V3a1 1 0 0 0-.08-.38Z"/>',
|
|
57
57
|
github:
|
|
@@ -89,10 +89,14 @@ export const Icons = {
|
|
|
89
89
|
stackOverflow:
|
|
90
90
|
'<path d="M15.72 0 14 1.28l6.4 8.58 1.7-1.26L15.73 0zm-3.94 3.42-1.36 1.64 8.22 6.85 1.37-1.64-8.23-6.85zM8.64 7.88l-.91 1.94 9.7 4.52.9-1.94-9.7-4.52zm-1.86 4.86-.44 2.1 10.48 2.2.44-2.1-10.47-2.2zM1.9 15.47V24h19.19v-8.53h-2.13v6.4H4.02v-6.4H1.9zm4.26 2.13v2.13h10.66V17.6H6.15Z"/>',
|
|
91
91
|
telegram:
|
|
92
|
-
'<path d="M22.
|
|
93
|
-
rss: '<path d="M2.88
|
|
92
|
+
'<path d="M22.265 2.428a2.048 2.048 0 0 0-2.078-.324L2.266 9.339a2.043 2.043 0 0 0 .104 3.818l3.625 1.261 2.02 6.682a.998.998 0 0 0 .119.252c.008.012.019.02.027.033a.988.988 0 0 0 .211.215.972.972 0 0 0 .07.05.986.986 0 0 0 .31.136l.013.001.006.003a1.022 1.022 0 0 0 .203.02l.018-.003a.993.993 0 0 0 .301-.052c.023-.008.042-.02.064-.03a.993.993 0 0 0 .205-.114 250.76 250.76 0 0 1 .152-.129l2.702-2.983 4.03 3.122a2.023 2.023 0 0 0 1.241.427 2.054 2.054 0 0 0 2.008-1.633l3.263-16.017a2.03 2.03 0 0 0-.693-1.97ZM9.37 14.736a.994.994 0 0 0-.272.506l-.31 1.504-.784-2.593 4.065-2.117Zm8.302 5.304-4.763-3.69a1.001 1.001 0 0 0-1.353.12l-.866.955.306-1.487 7.083-7.083a1 1 0 0 0-1.169-1.593L6.745 12.554 3.02 11.191 20.999 4Z"/>',
|
|
93
|
+
rss: '<path d="M2.88 16.88a3 3 0 0 0 0 4.24 3 3 0 0 0 4.24 0 3 3 0 0 0-4.24-4.24Zm2.83 2.83a1 1 0 0 1-1.42-1.42 1 1 0 0 1 1.42 0 1 1 0 0 1 0 1.42ZM5 12a1 1 0 0 0 0 2 5 5 0 0 1 5 5 1 1 0 0 0 2 0 7 7 0 0 0-7-7Zm0-4a1 1 0 0 0 0 2 9 9 0 0 1 9 9 1 1 0 0 0 2 0 11.08 11.08 0 0 0-3.22-7.78A11.08 11.08 0 0 0 5 8Zm10.61.39A15.11 15.11 0 0 0 5 4a1 1 0 0 0 0 2 13 13 0 0 1 13 13 1 1 0 0 0 2 0 15.11 15.11 0 0 0-4.39-10.61Z"/>',
|
|
94
94
|
facebook:
|
|
95
|
-
'<path d="M20.9
|
|
95
|
+
'<path d="M20.9 2H3.1A1.1 1.1 0 0 0 2 3.1v17.8A1.1 1.1 0 0 0 3.1 22h9.58v-7.75h-2.6v-3h2.6V9a3.64 3.64 0 0 1 3.88-4 20.26 20.26 0 0 1 2.33.12v2.7H17.3c-1.26 0-1.5.6-1.5 1.47v1.93h3l-.39 3H15.8V22h5.1a1.1 1.1 0 0 0 1.1-1.1V3.1A1.1 1.1 0 0 0 20.9 2Z"/>',
|
|
96
96
|
email:
|
|
97
|
-
'<path d="M19
|
|
97
|
+
'<path d="M19 4H5a3 3 0 0 0-3 3v10a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3V7a3 3 0 0 0-3-3Zm-.41 2-5.88 5.88a1 1 0 0 1-1.42 0L5.41 6ZM20 17a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7.41l5.88 5.88a3 3 0 0 0 4.24 0L20 7.41Z"/>',
|
|
98
|
+
reddit:
|
|
99
|
+
'<path d="M14.41 16.87a3.38 3.38 0 0 1-2.37.63 3.37 3.37 0 0 1-2.36-.63 1 1 0 0 0-1.42 1.41 5.11 5.11 0 0 0 3.78 1.22 5.12 5.12 0 0 0 3.78-1.22 1 1 0 1 0-1.41-1.41ZM9.2 15a1 1 0 1 0-1-1 1 1 0 0 0 1 1Zm6-2a1 1 0 1 0 1 1 1 1 0 0 0-1-1Zm7.8-1.22a3.77 3.77 0 0 0-6.8-2.26 16.5 16.5 0 0 0-3.04-.48l.85-5.7 2.09.7a3 3 0 0 0 6-.06v-.02a3.03 3.03 0 0 0-3-2.96 2.98 2.98 0 0 0-2.34 1.16l-3.24-1.1a1 1 0 0 0-1.3.8l-1.09 7.17a16.66 16.66 0 0 0-3.34.49 3.77 3.77 0 0 0-6.22 4.23A4.86 4.86 0 0 0 1 16c0 3.92 4.83 7 11 7s11-3.08 11-7a4.86 4.86 0 0 0-.57-2.25 3.78 3.78 0 0 0 .57-1.97ZM19.1 3a1 1 0 1 1-1 1 1.02 1.02 0 0 1 1-1ZM4.77 10a1.76 1.76 0 0 1 .88.25A9.98 9.98 0 0 0 3 11.92v-.14A1.78 1.78 0 0 1 4.78 10ZM12 21c-4.88 0-9-2.29-9-5s4.12-5 9-5 9 2.29 9 5-4.12 5-9 5Zm8.99-9.08a9.98 9.98 0 0 0-2.65-1.67 1.76 1.76 0 0 1 .88-.25A1.78 1.78 0 0 1 21 11.78l-.01.14Z"/>',
|
|
100
|
+
patreon:
|
|
101
|
+
'<path d="M22.04 7.6c0-2.8-2.19-5.1-4.75-5.93a15.19 15.19 0 0 0-10.44.55C3.16 3.96 2 7.78 1.95 11.58c-.02 3.12.3 11.36 4.94 11.42 3.45.04 3.97-4.4 5.56-6.55 1.14-1.52 2.6-1.95 4.4-2.4 3.1-.76 5.2-3.2 5.2-6.44Z"/>',
|
|
98
102
|
};
|
|
@@ -7,8 +7,8 @@ import type { Props } from '../props';
|
|
|
7
7
|
<style>
|
|
8
8
|
.content
|
|
9
9
|
:global(
|
|
10
|
-
:not(a, strong, em, del, span, input)
|
|
11
|
-
+ :not(a, strong, em, del, span, input, :where(.not-content *))
|
|
10
|
+
:not(a, strong, em, del, span, input, code)
|
|
11
|
+
+ :not(a, strong, em, del, span, input, code, :where(.not-content *))
|
|
12
12
|
) {
|
|
13
13
|
margin-top: 1.5rem;
|
|
14
14
|
}
|
|
@@ -9,7 +9,7 @@ const isRtl = dir === 'rtl';
|
|
|
9
9
|
const t = useTranslations(locale);
|
|
10
10
|
---
|
|
11
11
|
|
|
12
|
-
<div class="pagination-links
|
|
12
|
+
<div class="pagination-links" dir={dir}>
|
|
13
13
|
{
|
|
14
14
|
prev && (
|
|
15
15
|
<a href={prev.href} rel="prev">
|
|
@@ -38,7 +38,8 @@ const t = useTranslations(locale);
|
|
|
38
38
|
|
|
39
39
|
<style>
|
|
40
40
|
.pagination-links {
|
|
41
|
-
|
|
41
|
+
display: grid;
|
|
42
|
+
grid-template-columns: repeat(auto-fit, minmax(min(18rem, 100%), 1fr));
|
|
42
43
|
gap: 1rem;
|
|
43
44
|
}
|
|
44
45
|
|
|
@@ -56,6 +57,7 @@ const t = useTranslations(locale);
|
|
|
56
57
|
text-decoration: none;
|
|
57
58
|
color: var(--sl-color-gray-2);
|
|
58
59
|
box-shadow: var(--sl-shadow-md);
|
|
60
|
+
overflow-wrap: anywhere;
|
|
59
61
|
}
|
|
60
62
|
[rel='next'] {
|
|
61
63
|
justify-content: end;
|
|
@@ -71,4 +73,8 @@ const t = useTranslations(locale);
|
|
|
71
73
|
font-size: var(--sl-text-2xl);
|
|
72
74
|
line-height: var(--sl-line-height-headings);
|
|
73
75
|
}
|
|
76
|
+
|
|
77
|
+
svg {
|
|
78
|
+
flex-shrink: 0;
|
|
79
|
+
}
|
|
74
80
|
</style>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astrojs/starlight",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.2",
|
|
4
4
|
"description": "Build beautiful, high-performance documentation websites with Astro",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"docs",
|
|
@@ -171,7 +171,7 @@
|
|
|
171
171
|
"@pagefind/default-ui": "^1.0.3",
|
|
172
172
|
"@types/mdast": "^3.0.11",
|
|
173
173
|
"bcp-47": "^2.1.0",
|
|
174
|
-
"execa": "^
|
|
174
|
+
"execa": "^8.0.1",
|
|
175
175
|
"hast-util-select": "^5.0.5",
|
|
176
176
|
"hastscript": "^7.2.0",
|
|
177
177
|
"pagefind": "^1.0.3",
|
package/schemas/sidebar.ts
CHANGED
|
@@ -2,6 +2,7 @@ import type { AstroBuiltinAttributes } from 'astro';
|
|
|
2
2
|
import type { HTMLAttributes } from 'astro/types';
|
|
3
3
|
import { z } from 'astro/zod';
|
|
4
4
|
import { BadgeConfigSchema } from './badge';
|
|
5
|
+
import { stripLeadingAndTrailingSlashes } from '../utils/path';
|
|
5
6
|
|
|
6
7
|
const SidebarBaseSchema = z.object({
|
|
7
8
|
/** The visible label for this item in the sidebar. */
|
|
@@ -39,7 +40,7 @@ const AutoSidebarGroupSchema = SidebarGroupSchema.extend({
|
|
|
39
40
|
/** Enable autogenerating a sidebar category from a specific docs directory. */
|
|
40
41
|
autogenerate: z.object({
|
|
41
42
|
/** The directory to generate sidebar items for. */
|
|
42
|
-
directory: z.string(),
|
|
43
|
+
directory: z.string().transform(stripLeadingAndTrailingSlashes),
|
|
43
44
|
/**
|
|
44
45
|
* Whether the autogenerated subgroups should be collapsed by default.
|
|
45
46
|
* Defaults to the `AutoSidebarGroup` `collapsed` value.
|
package/schemas/social.ts
CHANGED
|
@@ -1,31 +1,35 @@
|
|
|
1
1
|
import { z } from 'astro/zod';
|
|
2
2
|
|
|
3
|
+
export const socialLinks = [
|
|
4
|
+
'twitter',
|
|
5
|
+
'mastodon',
|
|
6
|
+
'github',
|
|
7
|
+
'gitlab',
|
|
8
|
+
'bitbucket',
|
|
9
|
+
'discord',
|
|
10
|
+
'gitter',
|
|
11
|
+
'codeberg',
|
|
12
|
+
'codePen',
|
|
13
|
+
'youtube',
|
|
14
|
+
'threads',
|
|
15
|
+
'linkedin',
|
|
16
|
+
'twitch',
|
|
17
|
+
'microsoftTeams',
|
|
18
|
+
'instagram',
|
|
19
|
+
'stackOverflow',
|
|
20
|
+
'x.com',
|
|
21
|
+
'telegram',
|
|
22
|
+
'rss',
|
|
23
|
+
'facebook',
|
|
24
|
+
'email',
|
|
25
|
+
'reddit',
|
|
26
|
+
'patreon',
|
|
27
|
+
] as const;
|
|
28
|
+
|
|
3
29
|
export const SocialLinksSchema = () =>
|
|
4
30
|
z
|
|
5
31
|
.record(
|
|
6
|
-
z.enum(
|
|
7
|
-
'twitter',
|
|
8
|
-
'mastodon',
|
|
9
|
-
'github',
|
|
10
|
-
'gitlab',
|
|
11
|
-
'bitbucket',
|
|
12
|
-
'discord',
|
|
13
|
-
'gitter',
|
|
14
|
-
'codeberg',
|
|
15
|
-
'codePen',
|
|
16
|
-
'youtube',
|
|
17
|
-
'threads',
|
|
18
|
-
'linkedin',
|
|
19
|
-
'twitch',
|
|
20
|
-
'microsoftTeams',
|
|
21
|
-
'instagram',
|
|
22
|
-
'stackOverflow',
|
|
23
|
-
'x.com',
|
|
24
|
-
'telegram',
|
|
25
|
-
'rss',
|
|
26
|
-
'facebook',
|
|
27
|
-
'email',
|
|
28
|
-
]),
|
|
32
|
+
z.enum(socialLinks),
|
|
29
33
|
// Link to the respective social profile for this site
|
|
30
34
|
z.string().url()
|
|
31
35
|
)
|
|
@@ -57,6 +61,8 @@ export const SocialLinksSchema = () =>
|
|
|
57
61
|
rss: 'RSS',
|
|
58
62
|
facebook: 'Facebook',
|
|
59
63
|
email: 'Email',
|
|
64
|
+
reddit: 'Reddit',
|
|
65
|
+
patreon: 'Patreon',
|
|
60
66
|
}[key];
|
|
61
67
|
labelledLinks[key] = { label, url };
|
|
62
68
|
}
|
package/translations/id.json
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"menuButton.accessibleLabel": "Menu",
|
|
13
13
|
"sidebarNav.accessibleLabel": "Utama",
|
|
14
14
|
"tableOfContents.onThisPage": "Di halaman ini",
|
|
15
|
-
"tableOfContents.overview": "
|
|
15
|
+
"tableOfContents.overview": "Ringkasan",
|
|
16
16
|
"i18n.untranslatedContent": "Konten ini belum tersedia dalam bahasa Anda.",
|
|
17
17
|
"page.editLink": "Edit halaman",
|
|
18
18
|
"page.lastUpdated": "Terakhir diperbaharui:",
|
package/translations/index.ts
CHANGED
|
@@ -15,11 +15,12 @@ import da from './da.json';
|
|
|
15
15
|
import tr from './tr.json';
|
|
16
16
|
import ar from './ar.json';
|
|
17
17
|
import nb from './nb.json';
|
|
18
|
-
import zh from './zh.json';
|
|
18
|
+
import zh from './zh-CN.json';
|
|
19
19
|
import ko from './ko.json';
|
|
20
20
|
import sv from './sv.json';
|
|
21
21
|
import ru from './ru.json';
|
|
22
22
|
import vi from './vi.json';
|
|
23
|
+
import uk from './uk.json';
|
|
23
24
|
|
|
24
25
|
const { parse } = builtinI18nSchema();
|
|
25
26
|
|
|
@@ -46,5 +47,6 @@ export default Object.fromEntries(
|
|
|
46
47
|
sv,
|
|
47
48
|
ru,
|
|
48
49
|
vi,
|
|
50
|
+
uk,
|
|
49
51
|
}).map(([key, dict]) => [key, parse(dict)])
|
|
50
52
|
);
|
package/translations/ru.json
CHANGED
|
@@ -11,10 +11,10 @@
|
|
|
11
11
|
"languageSelect.accessibleLabel": "Выберите язык",
|
|
12
12
|
"menuButton.accessibleLabel": "Меню",
|
|
13
13
|
"sidebarNav.accessibleLabel": "Основное",
|
|
14
|
-
"tableOfContents.onThisPage": "На странице",
|
|
14
|
+
"tableOfContents.onThisPage": "На этой странице",
|
|
15
15
|
"tableOfContents.overview": "Обзор",
|
|
16
16
|
"i18n.untranslatedContent": "Этот содержимое пока не доступно на вашем языке.",
|
|
17
|
-
"page.editLink": "Редактировать
|
|
17
|
+
"page.editLink": "Редактировать страницу",
|
|
18
18
|
"page.lastUpdated": "Последнее обновление:",
|
|
19
19
|
"page.previousLink": "Предыдущая",
|
|
20
20
|
"page.nextLink": "Следующая",
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"skipLink.label": "Перейти до вмісту",
|
|
3
|
+
"search.label": "Пошук",
|
|
4
|
+
"search.shortcutLabel": "(Натисніть / для Пошуку)",
|
|
5
|
+
"search.cancelLabel": "Скасувати",
|
|
6
|
+
"search.devWarning": "Пошук доступний лише у виробничих зборках. \nСпробуйте виконати збірку та переглянути сайт, щоб протестувати його локально",
|
|
7
|
+
"themeSelect.accessibleLabel": "Вибрати Тему",
|
|
8
|
+
"themeSelect.dark": "Темна",
|
|
9
|
+
"themeSelect.light": "Світла",
|
|
10
|
+
"themeSelect.auto": "Авто",
|
|
11
|
+
"languageSelect.accessibleLabel": "Оберіть мову",
|
|
12
|
+
"menuButton.accessibleLabel": "Меню",
|
|
13
|
+
"sidebarNav.accessibleLabel": "Головне",
|
|
14
|
+
"tableOfContents.onThisPage": "На цій сторінці",
|
|
15
|
+
"tableOfContents.overview": "Огляд",
|
|
16
|
+
"i18n.untranslatedContent": "Цей контент ще не доступний на Вашій мові.",
|
|
17
|
+
"page.editLink": "Редагувати сторінку",
|
|
18
|
+
"page.lastUpdated": "Останнє оновлення:",
|
|
19
|
+
"page.previousLink": "Попередня",
|
|
20
|
+
"page.nextLink": "Наступна",
|
|
21
|
+
"404.text": "Сторінку не знайдено. Перевірте URL-адресу або спробуйте скористатися рядком пошуку."
|
|
22
|
+
}
|
package/utils/route-data.ts
CHANGED
|
@@ -5,9 +5,10 @@ import config from 'virtual:starlight/user-config';
|
|
|
5
5
|
import { generateToC, type TocItem } from './generateToC';
|
|
6
6
|
import { getFileCommitDate } from './git';
|
|
7
7
|
import { getPrevNextLinks, getSidebar, type SidebarEntry } from './navigation';
|
|
8
|
+
import { ensureTrailingSlash } from './path';
|
|
8
9
|
import type { Route } from './routing';
|
|
10
|
+
import { localizedId } from './slugs';
|
|
9
11
|
import { useTranslations } from './translations';
|
|
10
|
-
import { ensureTrailingSlash } from './path';
|
|
11
12
|
|
|
12
13
|
interface PageProps extends Route {
|
|
13
14
|
headings: MarkdownHeading[];
|
|
@@ -79,7 +80,7 @@ function getLastUpdated({ entry, id }: PageProps): Date | undefined {
|
|
|
79
80
|
return;
|
|
80
81
|
}
|
|
81
82
|
|
|
82
|
-
function getEditUrl({ entry, id }: PageProps): URL | undefined {
|
|
83
|
+
function getEditUrl({ entry, id, isFallback }: PageProps): URL | undefined {
|
|
83
84
|
const { editUrl } = entry.data;
|
|
84
85
|
// If frontmatter value is false, editing is disabled for this page.
|
|
85
86
|
if (editUrl === false) return;
|
|
@@ -90,8 +91,9 @@ function getEditUrl({ entry, id }: PageProps): URL | undefined {
|
|
|
90
91
|
url = editUrl;
|
|
91
92
|
} else if (config.editLink.baseUrl) {
|
|
92
93
|
const srcPath = project.srcDir.replace(project.root, '');
|
|
94
|
+
const filePath = isFallback ? localizedId(id, config.defaultLocale.locale) : id;
|
|
93
95
|
// If a base URL was added in Starlight config, synthesize the edit URL from it.
|
|
94
|
-
url = ensureTrailingSlash(config.editLink.baseUrl) + srcPath + 'content/docs/' +
|
|
96
|
+
url = ensureTrailingSlash(config.editLink.baseUrl) + srcPath + 'content/docs/' + filePath;
|
|
95
97
|
}
|
|
96
98
|
return url ? new URL(url) : undefined;
|
|
97
99
|
}
|
package/utils/user-config.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { z } from 'astro/zod';
|
|
2
2
|
import { parse as bcpParse, stringify as bcpStringify } from 'bcp-47';
|
|
3
|
-
import { BadgeConfigSchema } from '../schemas/badge';
|
|
4
3
|
import { ComponentConfigSchema } from '../schemas/components';
|
|
5
4
|
import { FaviconSchema } from '../schemas/favicon';
|
|
6
5
|
import { HeadConfigSchema } from '../schemas/head';
|
|
File without changes
|