Skip to content

Commit

Permalink
Merge branch 'main' into hd-draft-pages
Browse files Browse the repository at this point in the history
* main: (111 commits)
  Fix various Expressive Code translation issues (withastro#1708)
  Fix nested aside title rendering issue (withastro#1703)
  I18n(pt-PT): Add resources pages (withastro#1678)
  Add SST Ion & Font Awesome to site showcase (withastro#1710)
  [ci] format
  Add SudoVanilla to showcase (withastro#1702)
  i18n(fr): Update `resources-showcase` (withastro#1697)
  [i18nIgnore] docs: update `starlight-links-validator` to version `0.7.1` (withastro#1696)
  [ci] format
  [ci] release (withastro#1688)
  [ci] format
  Update Russian translation (withastro#1616)
  [ci] format
  Adds `starlight` icon to Starlight (withastro#1698)
  Update Icons.ts with Farcaster Purple for SocialIcons (withastro#1622)
  Remove duplicate from showcase example in `contributing.md` (withastro#1692)
  i18n(zh-cn): Update `showcase.mdx` (withastro#1689)
  [ci] format
  i18n(zh-cn): Update configuration.mdx (withastro#1691)
  i18n(ko-KR): update `showcase.mdx` (withastro#1690)
  ...
  • Loading branch information
HiDeoo committed Apr 5, 2024
2 parents 863bad5 + a72cb96 commit dd2c68c
Show file tree
Hide file tree
Showing 139 changed files with 4,916 additions and 1,084 deletions.
5 changes: 5 additions & 0 deletions .changeset/clean-squids-sparkle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@astrojs/starlight': patch
---

Fixes aside custom titles rendering for nested asides.
5 changes: 5 additions & 0 deletions .changeset/wet-lemons-drum.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@astrojs/starlight': patch
---

Fixes translation issues with Expressive Code when using a default language other than English
25 changes: 25 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -254,3 +254,28 @@ To add a language, you will need its BCP-47 tag and a label. See [“Adding a ne
[gfi]: https://github.com/withastro/starlight/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22+
[api-docs]: https://docs.astro.build/en/reference/integrations-reference/
[vitest]: https://vitest.dev/
## Showcase
We love to see websites built with Starlight and share them with the community on our [showcase](https://starlight.astro.build/resources/showcase/) page.
If you’ve built a documentation site with Starlight, adding it to the showcase is just a pull request away!
1. Set up a development environment by following the [“Setting up a development environment”](#setting-up-a-development-environment) instructions.
2. Add a screenshot of your site to the `docs/src/assets/showcase/` directory. The image file must:
- Be a `.png` file and named after your site’s domain, e.g. `example.com.png`.
- Have the dimensions of 800 × 450 pixels.
3. Add a new entry for your website in `docs/src/components/showcase-sites.astro`.
- The new entry must be appended at the end of the existing list of sites.
- The `title` attribute must be the name of your site with no extra details.
- The `href` attribute must be the URL of your Starlight site. If your documentation is hosted on a subdomain or subdirectory, include that in the URL.
- The `thumbnail` attribute must be the filename of the screenshot you added in step 2.
```diff
<Card title="Example" href="https://example.net" thumbnail="example.net.png" />
<Card title="Last Example" href="https://example.org" thumbnail="example.org.png" />
+ <Card title="New Example" href="https://example.com" thumbnail="example.com.png" />
</FluidGrid>
```
4. Open a pull request on GitHub to add your changes.
5 changes: 4 additions & 1 deletion docs/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export default defineConfig({
'pt-PT': 'Comece Aqui',
ko: '여기서부터',
tr: 'Buradan Başlayın',
ru: 'Начать отсюда',
ru: 'Первые шаги',
hi: 'यहाँ से शुरू करे',
uk: 'Почніть звідси',
},
Expand Down Expand Up @@ -160,6 +160,7 @@ export default defineConfig({
id: 'Panduan',
'zh-CN': '指南',
'pt-BR': 'Guias',
'pt-PT': 'Guias',
ko: '가이드',
tr: 'Rehber',
ru: 'Руководства',
Expand Down Expand Up @@ -194,7 +195,9 @@ export default defineConfig({
'zh-CN': '资源',
fr: 'Ressources',
'pt-BR': 'Recursos',
'pt-PT': 'Recursos',
ja: 'リソース',
ru: 'Ресурсы',
},
autogenerate: { directory: 'resources' },
},
Expand Down
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
},
"devDependencies": {
"pa11y-ci": "^3.0.1",
"starlight-links-validator": "^0.5.3",
"starlight-links-validator": "^0.7.1",
"start-server-and-test": "^2.0.0"
}
}
Binary file added docs/src/assets/showcase/api.dipsway.com.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/src/assets/showcase/docs.fontawesome.com.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/src/assets/showcase/ion.sst.dev.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/src/assets/showcase/runs-on.com.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/src/assets/showcase/screenshotone.com.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/src/assets/showcase/sudovanilla.com.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions docs/src/components/showcase-sites.astro
Original file line number Diff line number Diff line change
Expand Up @@ -108,4 +108,22 @@ import FluidGrid from './fluid-grid.astro';
<Card title="oneRepo" href="https://onerepo.tools" thumbnail="onerepo.tools.png" />
<Card title="Flojoy" href="https://docs.flojoy.ai" thumbnail="docs.flojoy.ai.png" />
<Card title="AstroNvim" href="https://docs.astronvim.com" thumbnail="docs.astronvim.com.png" />
<Card
title="ScreenshotOne Docs"
href="https://screenshotone.com/docs/"
thumbnail="screenshotone.com.png"
/>
<Card title="DipSway" href="https://api.dipsway.com" thumbnail="api.dipsway.com.png" />
<Card title="RunsOn" href="https://runs-on.com" thumbnail="runs-on.com.png" />
<Card
title="SudoVanilla"
href="https://sudovanilla.com/docs/minpluto/"
thumbnail="sudovanilla.com.png"
/>
<Card title="SST Ion" href="https://ion.sst.dev/" thumbnail="ion.sst.dev.png" />
<Card
title="Font Awesome"
href="https://docs.fontawesome.com/"
thumbnail="docs.fontawesome.com.png"
/>
</FluidGrid>
6 changes: 6 additions & 0 deletions docs/src/components/ui-strings-list.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
import { Code } from '@astrojs/starlight/components';
import uiStrings from '../../../packages/starlight/translations/en.json?raw';
---

<Code code={uiStrings} lang="json" />
4 changes: 2 additions & 2 deletions docs/src/content/docs/de/guides/authoring-content.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ Deine Benutzer können dank hilfreicher Starlight-Funktionen produktiver sein un

- Übersichtliche Navigation
- Benutzer-konfigurierbares Farbthema
- [i18n-Unterstützung](/de/guides/i18n)
- [i18n-Unterstützung](/de/guides/i18n/)

:::

Expand All @@ -161,7 +161,7 @@ Deine Benutzer können dank hilfreicher Starlight-Funktionen produktiver sein un

- Übersichtliche Navigation
- Benutzer-konfigurierbares Farbthema
- [i18n-Unterstützung](/de/guides/i18n)
- [i18n-Unterstützung](/de/guides/i18n/)

:::
```
Expand Down
10 changes: 5 additions & 5 deletions docs/src/content/docs/de/reference/overrides.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ tableOfContents:
maxHeadingLevel: 4
---

Du kannst Starlight's eingebaute Komponenten überschreiben, indem du Pfade zu Ersatzkomponenten in Starlight's [`components`](/de/reference/configuration#components)-Konfigurationsoption angibst.
Du kannst Starlight's eingebaute Komponenten überschreiben, indem du Pfade zu Ersatzkomponenten in Starlight's [`components`](/de/reference/configuration/#components)-Konfigurationsoption angibst.
Diese Seite listet alle Komponenten auf, die überschrieben werden können, und verweist auf ihre Standardimplementierungen auf GitHub.

Erfahre mehr in der [Anleitung zum Überschreiben von Komponenten](/de/guides/overriding-components/).
Expand Down Expand Up @@ -151,7 +151,7 @@ Diese Komponente wird innerhalb des `<head>` einer jeden Seite gerendert.
Enthält wichtige Tags wie `<title>`, und `<meta charset="utf-8">`.

Überschreibe diese Komponente nur, wenn es unbedingt notwendig ist.
Bevorzuge die [`head`](/de/reference/configuration#head) Option der Starlight-Konfiguration wenn möglich.
Bevorzuge die [`head`](/de/reference/configuration/#head) Option der Starlight-Konfiguration wenn möglich.

#### `ThemeProvider`

Expand Down Expand Up @@ -232,7 +232,7 @@ Die Standardimplementierung enthält die Schaltfläche in der Kopfzeile und den
**Standardkomponente:** [`SocialIcons.astro`](https://github.com/withastro/starlight/blob/main/packages/starlight/components/SocialIcons.astro)

Diese Komponente wird in der Kopfzeile der Website gerendert und enthält Links zu sozialen Symbolen.
Die Standardimplementierung verwendet die Option [`social`](/de/reference/configuration#social) in der Starlight-Konfiguration, um Icons und Links darzustellen.
Die Standardimplementierung verwendet die Option [`social`](/de/reference/configuration/#social) in der Starlight-Konfiguration, um Icons und Links darzustellen.

#### `ThemeSelect`

Expand Down Expand Up @@ -305,7 +305,7 @@ Folgende Komponenten werden in der Hauptspalte des Seiteninhalts wiedergegeben.
**Standardkomponente:** [`Banner.astro`](https://github.com/withastro/starlight/blob/main/packages/starlight/components/Banner.astro)

Diese Bannerkomponente wird oben auf jeder Seite angezeigt.
Die Standard-Implementierung verwendet den [`banner`](/de/reference/frontmatter#banner)-Frontmatter-Wert der Seite, um zu entscheiden, ob sie gerendert wird oder nicht.
Die Standard-Implementierung verwendet den [`banner`](/de/reference/frontmatter/#banner)-Frontmatter-Wert der Seite, um zu entscheiden, ob sie gerendert wird oder nicht.

#### `ContentPanel`

Expand All @@ -332,7 +332,7 @@ Wird nur auf mehrsprachigen Seiten verwendet.

**Standardkomponente:** [`Hero.astro`](https://github.com/withastro/starlight/blob/main/packages/starlight/components/Hero.astro)

Diese Komponente wird am oberen Rand der Seite angezeigt, wenn [`hero`](/de/reference/frontmatter#hero) in frontmatter eingestellt ist.
Diese Komponente wird am oberen Rand der Seite angezeigt, wenn [`hero`](/de/reference/frontmatter/#hero) in frontmatter eingestellt ist.
Die Standardimplementierung zeigt einen großen Titel, eine Tagline und Call-to-Action-Links neben einem optionalen Bild.

#### `MarkdownContent`
Expand Down
4 changes: 2 additions & 2 deletions docs/src/content/docs/es/guides/authoring-content.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ Tus usuarios pueden ser más productivos y encontrar más fácil de usar tu prod

- Navegación clara
- Tema de color configurable por el usuario
- [Soporte de i18n](/es/guides/i18n)
- [Soporte de i18n](/es/guides/i18n/)

:::

Expand All @@ -178,7 +178,7 @@ Tus usuarios pueden ser más productivos y encontrar más fácil de usar tu prod

- Navegación clara
- Tema de color configurable por el usuario
- [Soporte de i18n](/es/guides/i18n)
- [Soporte de i18n](/es/guides/i18n/)

:::
```
Expand Down
163 changes: 131 additions & 32 deletions docs/src/content/docs/es/guides/components.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -54,24 +54,34 @@ Starlight proporciona algunos componentes integrados para casos de uso comunes e

import { Tabs, TabItem } from '@astrojs/starlight/components';

Puedes mostrar una interfaz con pestañas utilizando los componentes `<Tabs>` y `<TabItem>`. Cada `<TabItem>` debe tener una `label` que se mostrará a los usuarios.
Puedes mostrar una interfaz con pestañas utilizando los componentes `<Tabs>` y `<TabItem>`.
Cada `<TabItem>` debe tener una `label` que se mostrará a los usuarios.
Usa el atributo opcional `icon` para incluir uno de los [iconos integrados de Starlight](#todos-los-iconos) junto a la etiqueta.

```mdx
# src/content/docs/example.mdx

import { Tabs, TabItem } from '@astrojs/starlight/components';

<Tabs>
<TabItem label="Estrellas">Sirius, Vega, Betelgeuse</TabItem>
<TabItem label="Lunas">Io, Europa, Ganymede</TabItem>
<TabItem label="Estrellas" icon="star">
Sirius, Vega, Betelgeuse
</TabItem>
<TabItem label="Lunas" icon="moon">
Io, Europa, Ganymede
</TabItem>
</Tabs>
```

El código anterior genera las siguientes pestañas en la página:

<Tabs>
<TabItem label="Estrellas">Sirius, Vega, Betelgeuse</TabItem>
<TabItem label="Lunas">Io, Europa, Ganymede</TabItem>
<TabItem label="Estrellas" icon="star">
Sirius, Vega, Betelgeuse
</TabItem>
<TabItem label="Lunas" icon="moon">
Io, Europa, Ganymede
</TabItem>
</Tabs>

### Tarjetas
Expand Down Expand Up @@ -228,33 +238,6 @@ Otro contenido también es compatible en los apartados.
Starlight también proporciona una sintaxis personalizada para renderizar apartados en Markdown y MDX como una alternativa al componente `<Aside>`.
Consulta la guía [“Creación de contenido en Markdown”](/es/guides/authoring-content/#apartados) para obtener más detalles de la sintaxis personalizada.

### Iconos

import { Icon } from '@astrojs/starlight/components';
import IconsList from '~/components/icons-list.astro';

Starlight proporciona un conjunto de iconos comunes que puedes mostrar en tu contenido utilizando el componente `<Icon>`.

Cada `<Icon>` requiere un atributo `name` que se puede encontrar en la lista de [todos los iconos](#todos-los-iconos), y opcionalmente puede incluir atributos como `label`, `size` y `color`.

```mdx
# src/content/docs/example.mdx

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

<Icon name="star" color="goldenrod" size="2rem" />
```

El código anterior genera lo siguiente en la página:

<Icon name="star" color="goldenrod" size="2rem" />

#### Todos los iconos

A continuación se muestra una lista de todos los iconos disponibles con sus nombres asociados. Haz clic en un ícono para copiar el código del componente correspondiente.

<IconsList />

### Código

Usa el componente `<Code>` para renderizar código con resaltado de sintaxis cuando no sea posible usar un [bloque de código Markdown](/es/guides/authoring-content/#bloques-de-código), por ejemplo, para renderizar datos provenientes de fuentes externas como archivos, bases de datos o APIs.
Expand Down Expand Up @@ -300,3 +283,119 @@ El código anterior genera lo siguiente en la página:
import importedCode from '/src/env.d.ts?raw';

<Code code={importedCode} lang="ts" title="src/env.d.ts" />

### Árbol de archivos

Usa el componente `<FileTree>` para mostrar la estructura de un directorio con iconos de archivo y subdirectorios colapsables.

Especifica la estructura de tus archivos y directorios con una [lista Markdown desordenada](https://www.markdownguide.org/basic-syntax/#unordered-lists) dentro de `<FileTree>`.
Crea un subdirectorio usando una lista anidada o agrega un `/` al final de un elemento de la lista para renderizarlo como un directorio sin contenido específico.

La siguiente sintaxis se puede utilizar para personalizar la apariencia del árbol de archivos:

- Resalta un archivo o directorio haciendo que su nombre esté en negrita, por ejemplo, `**README.md**`.
- Agrega un comentario a un archivo o directorio añadiendo más texto después del nombre.
- Agrega archivos de marcadores de posición y directorios mediante el uso de `...` o `` como nombre.

```mdx
# src/content/docs/example.mdx

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

<FileTree>

- astro.config.mjs un archivo **importante**
- package.json
- README.md
- src
- components
- **Header.astro**
-
- pages/

</FileTree>
```

El código anterior genera lo siguiente en la página:

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

<FileTree>

- astro.config.mjs un archivo **importante**
- package.json
- README.md
- src
- components
- **Header.astro**
-
- pages/

</FileTree>

### Pasos

Usa el componente `<Steps>` para dar estilo a listas numeradas de tareas.
Este es útil para guías paso a paso más complejas donde cada paso debe destacarse claramente.

Envuelve `<Steps>` alrededor de una lista ordenada de Markdown estándar.
Toda la sintaxis de Markdown habitual es aplicable dentro de `<Steps>`.

````mdx title="src/content/docs/example.mdx"
import { Steps } from '@astrojs/starlight/components';

<Steps>

1. Importa el componente en tu archivo MDX:

```js
import { Steps } from '@astrojs/starlight/components';
```

2. Envuelve `<Steps>` alrededor de tus elementos de lista ordenada.

</Steps>
````

El código anterior genera lo siguiente en la página:

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

<Steps>

1. Importa el componente en tu archivo MDX:

```js
import { Steps } from '@astrojs/starlight/components';
```

2. Envuelve `<Steps>` alrededor de tus elementos de lista ordenada.

</Steps>

### Iconos

import { Icon } from '@astrojs/starlight/components';
import IconsList from '~/components/icons-list.astro';

Starlight proporciona un conjunto de iconos comunes que puedes mostrar en tu contenido utilizando el componente `<Icon>`.

Cada `<Icon>` requiere un atributo `name` que se puede encontrar en la lista de [todos los iconos](#todos-los-iconos), y opcionalmente puede incluir atributos como `label`, `size` y `color`.

```mdx
# src/content/docs/example.mdx
import { Icon } from '@astrojs/starlight/components';
<Icon name="star" color="goldenrod" size="2rem" />
```

El código anterior genera lo siguiente en la página:

<Icon name="star" color="goldenrod" size="2rem" />

#### Todos los iconos

A continuación se muestra una lista de todos los iconos disponibles con sus nombres asociados. Haz clic en un ícono para copiar el código del componente correspondiente.

<IconsList />
Loading

0 comments on commit dd2c68c

Please sign in to comment.