@astrojs/starlight 0.7.1 → 0.7.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 +14 -0
- package/components/Footer.astro +3 -0
- package/components/Icons.ts +2 -0
- package/components/SocialIcons.astro +1 -0
- package/components/TableOfContents/MobileTableOfContents.astro +1 -0
- package/components/TableOfContents/TableOfContentsList.astro +1 -1
- package/components/TableOfContents/generateToC.ts +1 -2
- package/layout/TwoColumnContent.astro +4 -0
- package/package.json +1 -1
- package/style/props.css +1 -0
- package/translations/fa.json +22 -0
- package/translations/index.ts +4 -4
- package/utils/user-config.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @astrojs/starlight
|
|
2
2
|
|
|
3
|
+
## 0.7.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#506](https://github.com/withastro/starlight/pull/506) [`5e3133c`](https://github.com/withastro/starlight/commit/5e3133c42232b201b981cf4b3bc1c3dd56b09fa5) Thanks [@HiDeoo](https://github.com/HiDeoo)! - Improve table of content current item highlight behavior
|
|
8
|
+
|
|
9
|
+
- [#499](https://github.com/withastro/starlight/pull/499) [`fcff49e`](https://github.com/withastro/starlight/commit/fcff49ee4260ad68e80833712e161cbb978a2562) Thanks [@D3vil0p3r](https://github.com/D3vil0p3r)! - Add icons for Instagram
|
|
10
|
+
|
|
11
|
+
- [#502](https://github.com/withastro/starlight/pull/502) [`3c87a16`](https://github.com/withastro/starlight/commit/3c87a16de3c867ad89294a0ea84d63eca2e74d7a) Thanks [@Mrahmani71](https://github.com/Mrahmani71)! - Add Farsi UI translations
|
|
12
|
+
|
|
13
|
+
- [#496](https://github.com/withastro/starlight/pull/496) [`cd28392`](https://github.com/withastro/starlight/commit/cd28392ac73ac0ba1a441328fcd1d65d7d441366) Thanks [@lorenzolewis](https://github.com/lorenzolewis)! - Fix `lastUpdated` date position to be consistent
|
|
14
|
+
|
|
15
|
+
- [#402](https://github.com/withastro/starlight/pull/402) [`d8669b8`](https://github.com/withastro/starlight/commit/d8669b869761ac15d1d611eda7dd94a62ce0fd7a) Thanks [@chopfitzroy](https://github.com/chopfitzroy)! - Fix content sometimes appearing above the mobile table of contents.
|
|
16
|
+
|
|
3
17
|
## 0.7.1
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/components/Footer.astro
CHANGED
package/components/Icons.ts
CHANGED
|
@@ -82,4 +82,6 @@ export const Icons = {
|
|
|
82
82
|
'<path d="M2.5 1 1 4.8v15.4h5.5V23h3.1l3-2.8H17l6-5.7V1H2.6ZM21 13.5l-3.4 3.3H12l-3 2.8v-2.8H4.5V3H21v10.5Zm-3.4-6.8v5.8h-2V6.7h2Zm-5.5 0v5.8h-2V6.7h2Z"/>',
|
|
83
83
|
microsoftTeams:
|
|
84
84
|
'<path d="M13.78 7.2a3.63 3.63 0 1 0-4.3-3.68h1.78a2.52 2.52 0 0 1 2.52 2.53V7.2zM7.34 18.8h3.92a2.52 2.52 0 0 0 2.52-2.52V8.37h4.17c.58.01 1.04.5 1.03 1.07v6.45a6.3 6.3 0 0 1-6.14 6.43 6.3 6.3 0 0 1-5.5-3.52zm16.1-14.06a2.51 2.51 0 1 1-5.02 0 2.51 2.51 0 0 1 5.02 0zm-3.36 14.24h-.17c.4-1 .59-2.05.57-3.11V9.46c0-.38-.07-.75-.23-1.09h2.69c.58 0 1.06.48 1.06 1.06v5.65a3.9 3.9 0 0 1-3.9 3.9h-.02z"/><path d="M1.02 5.02h10.24c.56 0 1.02.46 1.02 1.03v10.23a1.02 1.02 0 0 1-1.02 1.02H1.02A1.02 1.02 0 0 1 0 16.28V6.04c0-.56.46-1.02 1.02-1.02zm7.81 3.9V7.84H3.45v1.08h2.03v5.57h1.3V8.92h2.05z"/>',
|
|
85
|
+
instagram:
|
|
86
|
+
'<path d="M17.3 5.5a1.2 1.2 0 1 0 1.2 1.2 1.2 1.2 0 0 0-1.2-1.2ZM22 7.9a7.6 7.6 0 0 0-.4-2.5 5 5 0 0 0-1.2-1.7 4.7 4.7 0 0 0-1.8-1.2 7.3 7.3 0 0 0-2.4-.4L12 2H7.9a7.3 7.3 0 0 0-2.5.5 4.8 4.8 0 0 0-1.7 1.2 4.7 4.7 0 0 0-1.2 1.8 7.3 7.3 0 0 0-.4 2.4L2 12v4.1a7.3 7.3 0 0 0 .5 2.4 4.7 4.7 0 0 0 1.2 1.8 4.8 4.8 0 0 0 1.8 1.2 7.3 7.3 0 0 0 2.4.4l4.1.1h4.1a7.3 7.3 0 0 0 2.4-.5 4.7 4.7 0 0 0 1.8-1.2 4.8 4.8 0 0 0 1.2-1.7 7.6 7.6 0 0 0 .4-2.5L22 12V7.9ZM20.1 16a5.6 5.6 0 0 1-.3 1.9A3 3 0 0 1 19 19a3.2 3.2 0 0 1-1.1.8 5.6 5.6 0 0 1-1.9.3H8a5.7 5.7 0 0 1-1.9-.3A3.3 3.3 0 0 1 5 19a3 3 0 0 1-.7-1.1 5.5 5.5 0 0 1-.4-1.9l-.1-4V8a5.5 5.5 0 0 1 .4-1.9A3 3 0 0 1 5 5a3.1 3.1 0 0 1 1.1-.8A5.7 5.7 0 0 1 8 3.9l4-.1h4a5.6 5.6 0 0 1 1.9.4A3 3 0 0 1 19 5a3 3 0 0 1 .7 1.1A5.6 5.6 0 0 1 20 8l.1 4v4ZM12 6.9a5.1 5.1 0 1 0 5.1 5.1A5.1 5.1 0 0 0 12 6.9Zm0 8.4a3.3 3.3 0 1 1 3.3-3.3 3.3 3.3 0 0 1-3.3 3.3Z"/>',
|
|
85
87
|
};
|
|
@@ -14,7 +14,7 @@ const { toc, isMobile = false, depth = 0 } = Astro.props;
|
|
|
14
14
|
{
|
|
15
15
|
toc.map((heading) => (
|
|
16
16
|
<li>
|
|
17
|
-
<a href={'#' + heading.slug}
|
|
17
|
+
<a href={'#' + heading.slug}>
|
|
18
18
|
<span>{heading.text}</span>
|
|
19
19
|
</a>
|
|
20
20
|
{heading.children.length > 0 && (
|
|
@@ -2,7 +2,6 @@ import type { MarkdownHeading } from 'astro';
|
|
|
2
2
|
|
|
3
3
|
export interface TocItem extends MarkdownHeading {
|
|
4
4
|
children: TocItem[];
|
|
5
|
-
current?: boolean;
|
|
6
5
|
}
|
|
7
6
|
|
|
8
7
|
function diveChildren(item: TocItem, depth: number): TocItem[] {
|
|
@@ -34,7 +33,7 @@ export function generateToC(
|
|
|
34
33
|
|
|
35
34
|
for (const heading of headings) {
|
|
36
35
|
if (toc.length === 0) {
|
|
37
|
-
toc.push({ ...heading, children: []
|
|
36
|
+
toc.push({ ...heading, children: [] });
|
|
38
37
|
} else {
|
|
39
38
|
const lastItemInToc = toc.at(-1)!;
|
|
40
39
|
if (heading.depth < lastItemInToc.depth) {
|
package/package.json
CHANGED
package/style/props.css
CHANGED
|
@@ -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/translations/index.ts
CHANGED
|
@@ -5,6 +5,7 @@ import es from './es.json';
|
|
|
5
5
|
import de from './de.json';
|
|
6
6
|
import ja from './ja.json';
|
|
7
7
|
import pt from './pt.json';
|
|
8
|
+
import fa from './fa.json';
|
|
8
9
|
import fr from './fr.json';
|
|
9
10
|
import it from './it.json';
|
|
10
11
|
import nl from './nl.json';
|
|
@@ -17,8 +18,7 @@ import zh from './zh.json';
|
|
|
17
18
|
const { parse } = builtinI18nSchema();
|
|
18
19
|
|
|
19
20
|
export default Object.fromEntries(
|
|
20
|
-
Object.entries({ cs, en, es, de, ja, pt, fr, it, nl, da, tr, ar, nb, zh }).map(
|
|
21
|
-
key,
|
|
22
|
-
|
|
23
|
-
])
|
|
21
|
+
Object.entries({ cs, en, es, de, ja, pt, fa, fr, it, nl, da, tr, ar, nb, zh }).map(
|
|
22
|
+
([key, dict]) => [key, parse(dict)]
|
|
23
|
+
)
|
|
24
24
|
);
|