@astrojs/starlight 0.4.0 → 0.4.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/404.astro +5 -2
- package/CHANGELOG.md +18 -0
- package/components/MarkdownContent.astro +5 -0
- package/index.ts +1 -0
- package/package.json +2 -2
- package/style/props.css +3 -3
- package/style/reset.css +5 -1
- package/translations/ar.json +22 -0
- package/translations/index.ts +2 -1
package/404.astro
CHANGED
|
@@ -6,7 +6,10 @@ import Page from './layout/Page.astro';
|
|
|
6
6
|
import type { StarlightDocsEntry } from './utils/routing';
|
|
7
7
|
import { useTranslations } from './utils/translations';
|
|
8
8
|
|
|
9
|
-
const { lang = 'en', dir = 'ltr'
|
|
9
|
+
const { lang = 'en', dir = 'ltr' } = config.defaultLocale || {};
|
|
10
|
+
let locale = config.defaultLocale?.locale;
|
|
11
|
+
if (locale === 'root') locale = undefined;
|
|
12
|
+
|
|
10
13
|
const entryMeta = { dir, lang, locale };
|
|
11
14
|
const t = useTranslations(locale);
|
|
12
15
|
|
|
@@ -34,6 +37,6 @@ const entry = userEntry || fallbackEntry;
|
|
|
34
37
|
const { Content, headings } = await entry.render();
|
|
35
38
|
---
|
|
36
39
|
|
|
37
|
-
<Page {headings} entry={entry} slug={entry.slug} {...entryMeta} {entryMeta}>
|
|
40
|
+
<Page {headings} entry={entry} id={entry.id} slug={entry.slug} {...entryMeta} {entryMeta}>
|
|
38
41
|
<Content />
|
|
39
42
|
</Page>
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @astrojs/starlight
|
|
2
2
|
|
|
3
|
+
## 0.4.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#308](https://github.com/withastro/starlight/pull/308) [`c3aa4c6`](https://github.com/withastro/starlight/commit/c3aa4c6aa18f7f6859ad1c0acc28f0da59a84760) Thanks [@delucis](https://github.com/delucis)! - Fix use of default monospace font stack
|
|
8
|
+
|
|
9
|
+
- [#286](https://github.com/withastro/starlight/pull/286) [`a2aedfc`](https://github.com/withastro/starlight/commit/a2aedfc7f9555b44f5f33aad7f4a98b207a11b47) Thanks [@mzaien](https://github.com/mzaien)! - Add Arabic UI translations
|
|
10
|
+
|
|
11
|
+
## 0.4.1
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#300](https://github.com/withastro/starlight/pull/300) [`377a25d`](https://github.com/withastro/starlight/commit/377a25dc4c51c060e751aeba4d3f946a41de907a) Thanks [@cbontems](https://github.com/cbontems)! - Fix broken link on 404 page when `defaultLocale: 'root'` is set in `astro.config.mjs`
|
|
16
|
+
|
|
17
|
+
- [#289](https://github.com/withastro/starlight/pull/289) [`dffca46`](https://github.com/withastro/starlight/commit/dffca461633940847e9177913053885c5e8b5f29) Thanks [@RyanRBrown](https://github.com/RyanRBrown)! - Fix saturation of purple text in light theme
|
|
18
|
+
|
|
19
|
+
- [#301](https://github.com/withastro/starlight/pull/301) [`d47639d`](https://github.com/withastro/starlight/commit/d47639d50b53fa691c1d9b0f30f82ebf7f6ddf7e) Thanks [@delucis](https://github.com/delucis)! - Enable inline stylesheets for Astro versions ≥2.6.0
|
|
20
|
+
|
|
3
21
|
## 0.4.0
|
|
4
22
|
|
|
5
23
|
### Minor Changes
|
|
@@ -77,6 +77,10 @@
|
|
|
77
77
|
background-color: var(--sl-color-bg-inline-code);
|
|
78
78
|
margin-block: -0.125rem;
|
|
79
79
|
padding: 0.125rem 0.375rem;
|
|
80
|
+
font-size: var(--sl-text-code-sm);
|
|
81
|
+
}
|
|
82
|
+
.content :global(:is(h1, h2, h3, h4, h5, h6) code) {
|
|
83
|
+
font-size: inherit;
|
|
80
84
|
}
|
|
81
85
|
|
|
82
86
|
.content :global(pre) {
|
|
@@ -87,6 +91,7 @@
|
|
|
87
91
|
|
|
88
92
|
.content :global(pre code) {
|
|
89
93
|
all: unset;
|
|
94
|
+
font-family: var(--__sl-font-mono);
|
|
90
95
|
}
|
|
91
96
|
|
|
92
97
|
.content :global(blockquote) {
|
package/index.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astrojs/starlight",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"description": "Build beautiful, high-performance documentation websites with Astro",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"docs",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@types/node": "^18.15.11",
|
|
34
|
-
"astro": "
|
|
34
|
+
"astro": "2.7.0"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@astrojs/mdx": "^0.19.7",
|
package/style/props.css
CHANGED
|
@@ -89,8 +89,8 @@
|
|
|
89
89
|
'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
|
|
90
90
|
--sl-font-system-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
|
|
91
91
|
'Liberation Mono', 'Courier New', monospace;
|
|
92
|
-
--
|
|
93
|
-
--
|
|
92
|
+
--__sl-font: var(--sl-font, ''), var(--sl-font-system);
|
|
93
|
+
--__sl-font-mono: var(--sl-font-mono, ''), var(--sl-font-system-mono);
|
|
94
94
|
|
|
95
95
|
/** Key layout values */
|
|
96
96
|
--sl-nav-height: 3.5rem;
|
|
@@ -135,7 +135,7 @@
|
|
|
135
135
|
--sl-color-blue-high: hsl(var(--sl-hue-blue), 80%, 30%);
|
|
136
136
|
--sl-color-blue: hsl(var(--sl-hue-blue), 90%, 60%);
|
|
137
137
|
--sl-color-blue-low: hsl(var(--sl-hue-blue), 88%, 90%);
|
|
138
|
-
--sl-color-purple-high: hsl(var(--sl-hue-purple),
|
|
138
|
+
--sl-color-purple-high: hsl(var(--sl-hue-purple), 90%, 30%);
|
|
139
139
|
--sl-color-purple: hsl(var(--sl-hue-purple), 90%, 60%);
|
|
140
140
|
--sl-color-purple-low: hsl(var(--sl-hue-purple), 80%, 90%);
|
|
141
141
|
--sl-color-red-high: hsl(var(--sl-hue-red), 80%, 30%);
|
package/style/reset.css
CHANGED
|
@@ -18,7 +18,7 @@ html[data-theme='light'] {
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
body {
|
|
21
|
-
font-family: var(--
|
|
21
|
+
font-family: var(--__sl-font);
|
|
22
22
|
line-height: var(--sl-line-height);
|
|
23
23
|
-webkit-font-smoothing: antialiased;
|
|
24
24
|
color: var(--sl-color-text);
|
|
@@ -41,3 +41,7 @@ h5,
|
|
|
41
41
|
h6 {
|
|
42
42
|
overflow-wrap: break-word;
|
|
43
43
|
}
|
|
44
|
+
|
|
45
|
+
code {
|
|
46
|
+
font-family: var(--__sl-font-mono);
|
|
47
|
+
}
|
|
@@ -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": "الصفحة غير موجودة. تأكد من الرابط أو ابحث بإستعمال شريط البحث."
|
|
22
|
+
}
|
package/translations/index.ts
CHANGED
|
@@ -10,11 +10,12 @@ import it from './it.json';
|
|
|
10
10
|
import nl from './nl.json';
|
|
11
11
|
import da from './da.json';
|
|
12
12
|
import tr from './tr.json';
|
|
13
|
+
import ar from './ar.json';
|
|
13
14
|
|
|
14
15
|
const { parse } = builtinI18nSchema();
|
|
15
16
|
|
|
16
17
|
export default Object.fromEntries(
|
|
17
|
-
Object.entries({ cs, en, es, de, ja, pt, fr, it, nl, da, tr }).map(([key, dict]) => [
|
|
18
|
+
Object.entries({ cs, en, es, de, ja, pt, fr, it, nl, da, tr, ar }).map(([key, dict]) => [
|
|
18
19
|
key,
|
|
19
20
|
parse(dict),
|
|
20
21
|
])
|