Skip to content

Commit

Permalink
Merge branch 'main' into hd-refactor-starlight-page-sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
delucis committed Aug 16, 2024
2 parents 4810cbf + 9368494 commit b569fd2
Show file tree
Hide file tree
Showing 53 changed files with 1,076 additions and 400 deletions.
14 changes: 14 additions & 0 deletions .changeset/swift-laws-yawn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
'@astrojs/starlight': minor
---

Adds a guideline to the last step of the `<Steps>` component.

If you want to preserve the previous behaviour and hide the guideline on final steps, you can add the following custom CSS to your site:

```css
/* Hide the guideline for the final step in <Steps> lists. */
.sl-steps > li:last-of-type::after {
background: transparent;
}
```
5 changes: 5 additions & 0 deletions .changeset/weak-insects-hope.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@astrojs/starlight': minor
---

Adds state persistence across page navigations to the main site sidebar
1 change: 0 additions & 1 deletion docs/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ export default defineConfig({
},
{
label: 'Resources',
badge: 'New',
translations: {
'zh-CN': '资源',
fr: 'Ressources',
Expand Down
4 changes: 4 additions & 0 deletions docs/src/assets/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
User-agent: *
Allow: /

Sitemap: https://starlight.astro.build/sitemap-index.xml
Binary file added docs/src/assets/showcase/grpc.md.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions docs/src/components/showcase-sites.astro
Original file line number Diff line number Diff line change
Expand Up @@ -157,4 +157,10 @@ import FluidGrid from './fluid-grid.astro';
thumbnail="styledictionary.com.png"
/>
<Card title="CodeSweetly" href="https://codesweetly.com/" thumbnail="codesweetly.com.png" />
<Card title="grpcmd" href="https://grpc.md/" thumbnail="grpc.md.png" />
<Card
title="Pokemon Database"
href="https://pokemon-siace.netlify.app/"
thumbnail="pokemon-siace.netlify.app.png"
/>
</FluidGrid>
2 changes: 2 additions & 0 deletions docs/src/content/docs/fr/guides/customization.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ export default defineConfig({
});
```

Apprenez comment [ajouter un lien du plan de site au fichier `robots.txt`](https://docs.astro.build/fr/guides/integrations-guide/sitemap/#lien-vers-le-plan-du-site-dans-le-fichier-robotstxt) dans la documentation d'Astro.

## Mise en Page

Par défaut, les pages Starlight utilisent une mise en page avec une barre latérale de navigation globale et une table des matières qui affiche les titres de la page courante.
Expand Down
12 changes: 12 additions & 0 deletions docs/src/content/docs/fr/resources/plugins.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,18 @@ Les [modules d'extension](/fr/reference/plugins/) peuvent personnaliser la confi
title="starlight-versions"
description="Versionner vos pages de documentation Starlight."
/>
<LinkCard
href="https://inox-tools.fryuni.dev/star-warp"
title="star-warp"
description="Accéder aux résultats de recherche de votre documentation à la vitesse de la lumière."
/>
</CardGrid>

### Thèmes communautaires

Un thème est un module d'extension Starlight qui modifie l'apparence visuelle d'un site avec des redéfinitions de composants, du CSS personnalisé ou d'autres nouvelles fonctionnalités.

<CardGrid>
<LinkCard
href="https://github.com/HiDeoo/starlight-theme-rapide"
title="starlight-theme-rapide"
Expand Down
2 changes: 2 additions & 0 deletions docs/src/content/docs/guides/customization.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ export default defineConfig({
});
```

Learn how to [add a sitemap link to `robots.txt`](https://docs.astro.build/en/guides/integrations-guide/sitemap/#sitemap-link-in-robotstxt) in the Astro Docs.

## Page layout

By default, Starlight pages use a layout with a global navigation sidebar and a table of contents that shows the current page headings.
Expand Down
30 changes: 16 additions & 14 deletions docs/src/content/docs/hi/environmental-impact.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,20 +89,21 @@ JavaScript को पार्स करना और संकलित कर
क्या आप जानना चाहते हैं कि अन्य दस्तावेज़ीकरण फ्रेमवर्क की तुलना कैसे की जाती है?
[Website Carbon Calculator][wcc] के साथ ये परीक्षण विभिन्न उपकरणों के साथ बनाए गए समान पृष्ठों की तुलना करते हैं।

| फ्रेमवर्क | प्रति पृष्ठ विज़िट CO₂ |
| --------------------------- | ---------------------- |
| [Starlight][sl-carbon] | 0.01g |
| [VitePress][vp-carbon] | 0.05g |
| [Docus][dc-carbon] | 0.05g |
| [Sphinx][sx-carbon] | 0.07g |
| [MkDocs][mk-carbon] | 0.10g |
| [Nextra][nx-carbon] | 0.11g |
| [docsify][dy-carbon] | 0.11g |
| [Docusaurus][ds-carbon] | 0.24g |
| [Read the Docs][rtd-carbon] | 0.24g |
| [GitBook][gb-carbon] | 0.71g |

<small>डेटा 14 मई 2023 को एकत्र किया गया। नवीनतम आंकड़े देखने के लिए लिंक पर क्लिक करें।</small>
| फ्रेमवर्क | प्रति पृष्ठ विज़िट CO₂ | रेटिंग |
| --------------------------- | ---------------------- | :----: |
| [Starlight][sl-carbon] | 0.01g | A+ |
| [Read the Docs][rtd-carbon] | 0.05g | A+ |
| [Sphinx][sx-carbon] | 0.06g | A+ |
| [VitePress][vp-carbon] | 0.07g | A+ |
| [Docus][dc-carbon] | 0.09g | A+ |
| [docsify][dy-carbon] | 0.10g | A |
| [Nextra][nx-carbon] | 0.11g | A |
| [MkDocs][mk-carbon] | 0.19g | B |
| [Docusaurus][ds-carbon] | 0.21g | B |
| [GitBook][gb-carbon] | 0.43g | C |
| [Mintlify][mt-carbon] | 1.22g | F |

<small>डेटा 22 जुलाई 2024 को एकत्र किया गया। नवीनतम आंकड़े देखने के लिए लिंक पर क्लिक करें।</small>

[sl-carbon]: https://www.websitecarbon.com/website/starlight-astro-build-getting-started/
[vp-carbon]: https://www.websitecarbon.com/website/vitepress-dev-guide-what-is-vitepress/
Expand All @@ -114,6 +115,7 @@ JavaScript को पार्स करना और संकलित कर
[ds-carbon]: https://www.websitecarbon.com/website/docusaurus-io-docs/
[rtd-carbon]: https://www.websitecarbon.com/website/docs-readthedocs-io-en-stable-index-html/
[gb-carbon]: https://www.websitecarbon.com/website/docs-gitbook-com/
[mt-carbon]: https://www.websitecarbon.com/website/mintlify-com-docs-quickstart/

## और अधिक संसाधन

Expand Down
30 changes: 30 additions & 0 deletions docs/src/content/docs/hi/guides/components.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,36 @@ import { Steps } from '@astrojs/starlight/components';

</Steps>

### बैज

import { Badge } from '@astrojs/starlight/components';

स्थिति या लेबल जैसी छोटी जानकारी प्रदर्शित करने के लिए `<Badge>` अवयव का उपयोग करें।

वह सामग्री जिसे आप प्रदर्शित करना चाहते हैं उसे `<Badge>` अवयव की `text` विशेषता में भेजे।

डिफ़ॉल्ट रूप से, बैज आपकी साइट के थीम एक्सेंट रंग का उपयोग करेगा। बिल्ट-इन बैज रंग का उपयोग करने के लिए, `variant` विशेषता को निम्न मानों में से किसी एक पर सेट करें: `note` (नीला), `tip` (बैंगनी), `danger` (लाल), `caution` (नारंगी), या `success` (हरा)।

`size` विशेषता (डिफ़ॉल्ट: `small`) बैज पाठ के आकार को नियंत्रित करती है। बड़ा बैज प्रदर्शित करने के लिए `medium` और `large` भी उपलब्ध विकल्प हैं।

आगे के अनुकूलन के लिए, कस्टम CSS के साथ `<span>` विशेषताओं जैसे `class` या `style` का उपयोग करें।

```mdx title="src/content/docs/example.mdx"
import { Badge } from '@astrojs/starlight/components';
<Badge text="नया" variant="tip" size="small" />
<Badge text="पदावनत" variant="caution" size="medium" />
<Badge text="Starlight" variant="note" size="large" />
<Badge text="कस्टम" variant="success" style={{ fontStyle: 'italic' }} />
```

उपरोक्त कोड पृष्ठ पर निम्नलिखित उत्पन्न करता है:

<Badge text="नया" variant="tip" size="small" />
<Badge text="पदावनत" variant="caution" size="medium" />
<Badge text="Starlight" variant="note" size="large" />
<Badge text="कस्टम" variant="success" style={{ fontStyle: 'italic' }} />

### आइकन

import { Icon } from '@astrojs/starlight/components';
Expand Down
2 changes: 2 additions & 0 deletions docs/src/content/docs/hi/guides/customization.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ export default defineConfig({
});
```

Astro दस्तावेज़ीकरण में [`robots.txt` में साइटमैप लिंक जोड़ने](https://docs.astro.build/hi/guides/integrations-guide/sitemap/#sitemap-link-in-robotstxt) का तरीका जानें।

## पेज लेआउट

डिफ़ॉल्ट रूप से, Starlight पेज वैश्विक नेविगेशन साइडबार और विषय सूची के साथ एक लेआउट का उपयोग करते हैं जो वर्तमान पेज शीर्षक दिखाता है।
Expand Down
18 changes: 17 additions & 1 deletion docs/src/content/docs/hi/guides/i18n.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,12 @@ Starlight बहुभाषी साइटों के लिए अंतर

3. अब आप अपनी भाषा निर्देशिकाओं में कंटेंट फ़ाइलें जोड़ सकते हैं। सभी भाषाओं में पेजों को संबद्ध करने के लिए एक ही फ़ाइल नाम का उपयोग करें और फ़ॉलबैक कंटेंट अनुवाद सूचनाएं और बहुत कुछ सहित Starlight के i18n सुविधाओं के पूर्ण सेट का लाभ उठाएं।

उदाहरण के लिए, अरबी और अंग्रेजी के मुखपृष्ठ को दर्शाने के लिए क्रमशः `ar/index.md` और `en/index.md` बनाएं।
उदाहरण के लिए, अरबी और अंग्रेजी के मुखपेज को दर्शाने के लिए क्रमशः `ar/index.md` और `en/index.md` बनाएं।

</Steps>

अधिक उन्नत i18n परिदृश्यों के लिए, Starlight [Astro के `i18n` कॉन्फ़िगरेशन](https://docs.astro.build/hi/guides/internationalization/#configure-i18n-routing) विकल्प का उपयोग करके अंतर्राष्ट्रीयकरण को कॉन्फ़िगर करने का भी समर्थन करता है।

### root locale का उपयोग करें

आप किसी भाषा को उसके पथ में बिना किसी i18n उपसर्ग के प्रस्तुत करने के लिए “root” locale का उपयोग कर सकते हैं। उदाहरण के लिए, यदि अंग्रेजी आपका मूल स्थान है, तो एक अंग्रेजी पेज पथ `/en/about` के बजाय `/about` जैसा दिखेगा।
Expand Down Expand Up @@ -273,3 +275,17 @@ export const collections = {
```

Astro दस्तावेज़ में ["एक संग्रह स्कीमा को परिभाषित करना"](https://docs.astro.build/hi/guides/content-collections/#defining-a-collection-schema) में कंटेंट संग्रह स्कीमा के बारे में और जानें।

## वर्तमान लोकेल तक पहुँचना

आप `.astro` अवयवों में वर्तमान लोकेल पढ़ने के लिए [`Astro.currentLocale`](https://docs.astro.build/hi/reference/api-reference/#astrocurrentlocale) का उपयोग कर सकते हैं।

निम्नलिखित उदाहरण वर्तमान लोकेल को पढ़ता है और इसका उपयोग वर्तमान भाषा में एक परिचय पेज के लिए लिंक बनाने के लिए करता है:

```astro
---
// src/components/AboutLink.astro
---
<a href={`/${Astro.currentLocale}/about`}>के बारे में</a>
```
1 change: 1 addition & 0 deletions docs/src/content/docs/hi/guides/site-search.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ Starlight की अंतर्निहित [अंतर्राष्ट
"docsearch.searchBox.resetButtonAriaLabel": "Clear the query",
"docsearch.searchBox.cancelButtonText": "Cancel",
"docsearch.searchBox.cancelButtonAriaLabel": "Cancel",
"docsearch.searchBox.searchInputLabel": "Search",
"docsearch.startScreen.recentSearchesTitle": "Recent",
"docsearch.startScreen.noRecentSearchesText": "No recent searches",
Expand Down
30 changes: 16 additions & 14 deletions docs/src/content/docs/it/environmental-impact.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,20 +89,21 @@ Scegliere un host che usi energia da fonti rinnovabili significa ridurre le emis
Curioso di come altri framework per documentazioni si comparano?
Questi test eseguiti con [Website Carbon Calculator][wcc] confrontano pagine simili costruite con diversi framework.

| Framework | CO₂ per visita |
| --------------------------- | -------------- |
| [Starlight][sl-carbon] | 0,01 g |
| [VitePress][vp-carbon] | 0,05 g |
| [Docus][dc-carbon] | 0,05 g |
| [Sphinx][sx-carbon] | 0,07 g |
| [MkDocs][mk-carbon] | 0,10 g |
| [Nextra][nx-carbon] | 0,11 g |
| [docsify][dy-carbon] | 0,11 g |
| [Docusaurus][ds-carbon] | 0,24 g |
| [Read the Docs][rtd-carbon] | 0,24 g |
| [GitBook][gb-carbon] | 0,71 g |

<small>Dati collezionati il 14 Maggio 2023. Clicca i link per vedere i dati aggiornati.</small>
| Framework | CO₂ per visita | Voto |
| --------------------------- | -------------- | :--: |
| [Starlight][sl-carbon] | 0.01g | A+ |
| [Read the Docs][rtd-carbon] | 0.05g | A+ |
| [Sphinx][sx-carbon] | 0.06g | A+ |
| [VitePress][vp-carbon] | 0.07g | A+ |
| [Docus][dc-carbon] | 0.09g | A+ |
| [docsify][dy-carbon] | 0.10g | A |
| [Nextra][nx-carbon] | 0.11g | A |
| [MkDocs][mk-carbon] | 0.19g | B |
| [Docusaurus][ds-carbon] | 0.21g | B |
| [GitBook][gb-carbon] | 0.43g | C |
| [Mintlify][mt-carbon] | 1.22g | F |

<small>Dati collezionati il 22 Luglio 2024. Clicca i link per vedere i dati aggiornati.</small>

[sl-carbon]: https://www.websitecarbon.com/website/starlight-astro-build-getting-started/
[vp-carbon]: https://www.websitecarbon.com/website/vitepress-dev-guide-what-is-vitepress/
Expand All @@ -114,6 +115,7 @@ Questi test eseguiti con [Website Carbon Calculator][wcc] confrontano pagine sim
[ds-carbon]: https://www.websitecarbon.com/website/docusaurus-io-docs/
[rtd-carbon]: https://www.websitecarbon.com/website/docs-readthedocs-io-en-stable-index-html/
[gb-carbon]: https://www.websitecarbon.com/website/docs-gitbook-com/
[mt-carbon]: https://www.websitecarbon.com/website/mintlify-com-docs-quickstart/

## Altre risorse

Expand Down
6 changes: 3 additions & 3 deletions docs/src/content/docs/it/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Consulta le [istruzioni di configurazione manuale](/it/manual-setup/) per aggiun

Crea un nuovo progetto Astro + Starlight eseguendo il seguente comando nel tuo terminale:

<Tabs>
<Tabs syncKey="pkg">
<TabItem label="npm">

```sh
Expand Down Expand Up @@ -52,7 +52,7 @@ Quando lavori in locale, il [server di sviluppo di Astro](https://docs.astro.bui

All'interno della directory del progetto, esegui il seguente comando per avviare il server di sviluppo:

<Tabs>
<Tabs syncKey="pkg">
<TabItem label="npm">

```sh
Expand Down Expand Up @@ -103,7 +103,7 @@ Assicurati di aggiornare regolarmente Starlight!

Starlight è un'integrazione Astro. Puoi aggiornarlo e aggiornare altri pacchetti Astro eseguendo il seguente comando nel tuo terminale:

<Tabs>
<Tabs syncKey="pkg">
<TabItem label="npm">

```sh
Expand Down
25 changes: 25 additions & 0 deletions docs/src/content/docs/it/guides/authoring-content.md
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,31 @@ Il titolo opzionale di un blocco di codice può essere impostato sia con un attr
```
````

## Dettagli

I dettagli (noti anche come "disclosure" o "accordion") sono utili per nascondere contenuti che non sono immediatamente rilevanti.
Gli utenti possono cliccare su un breve riepilogo per espandere e visualizzare il contenuto completo.

Utilizza gli elementi HTML standard [`<details>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details) e [`<summary>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/summary) nel tuo contenuto Markdown per creare un widget di disclosure.

Puoi annidare qualsiasi altra sintassi Markdown all'interno di un elemento `<details>`.
<details>
<summary>Dove e quando è più visibile la costellazione di Andromeda?</summary>
La [costellazione di Andromeda](<https://it.wikipedia.org/wiki/Andromeda_(costellazione)>) è più visibile nel cielo notturno durante il mese di novembre a latitudini comprese tra `+90°` e `−40°`.
</details>
```md
<details>
<summary>Dove e quando è più visibile la costellazione di Andromeda?</summary>
La [costellazione di Andromeda](<https://it.wikipedia.org/wiki/Andromeda_(costellazione)>) è più visibile nel cielo notturno durante il mese di novembre a latitudini comprese tra `+90°` e `−40°`.
</details>
```
## Altre funzionalità Markdown utili
Starlight supporta tutte le altre funzionalità Markdown, come liste e tabelle. Guarda la [Markdown Cheat Sheet da The Markdown Guide](https://www.markdownguide.org/cheat-sheet/) per una panoramica veloce su tutte le funzionalità Markdown.
Expand Down
Loading

0 comments on commit b569fd2

Please sign in to comment.