Skip to content

Commit

Permalink
Merge branch 'main' into hd-fr-0-11-1-configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
HiDeoo committed Oct 19, 2023
2 parents a259152 + 4665ef7 commit e39ae15
Show file tree
Hide file tree
Showing 10 changed files with 139 additions and 127 deletions.
5 changes: 5 additions & 0 deletions .changeset/short-mirrors-happen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@astrojs/starlight': patch
---

Remove extra margin from markdown lists that uses inline code
Binary file added docs/src/assets/showcase/ai-prompt-snippets.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions docs/src/components/showcase-sites.astro
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,9 @@ import FluidGrid from './fluid-grid.astro';
thumbnail="drops-of-php.hi-folks.dev.png"
/>
<Card title="Nostalgist.js" href="https://nostalgist.js.org/" thumbnail="nostalgist.js.org.png" />
<Card
title="AI Prompt Snippets"
href="https://ai-prompt-snippets.vercel.app/"
thumbnail="ai-prompt-snippets.png"
/>
</FluidGrid>
2 changes: 1 addition & 1 deletion docs/src/content/docs/es/guides/customization.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ defineConfig({

Starlight cuenta con soporte incorporado para agregar enlaces a tus cuentas de redes sociales en el encabezado del sitio mediante la opción [`social`](/es/reference/configuration/#social) en la integración de Starlight.

Actualmente, se admiten enlaces a Bitbucket, Codeberg, CodePen, Discord, Correo Electrónico, Facebook, GitHub, GitLab, Gitter, Instagram, LinkedIn, Mastodon, Microsoft Teams, Patreon, Reddit, un flujo RSS, Stack Overflow, Telegram, Threads, Twitch, Twitter, X, y Youtube ¡Háznoslo saber en GitHub o Discord si necesitas soporte para otro servicio!
Puedes encontrar una lista completa de todos los iconos de enlaces compatibles en la [Referencia de Configuración](/es/reference/configuration/#social).

```js
// astro.config.mjs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ Starlight es una integración construida sobre el framework [Astro](https://astr
import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';
export default defineConfig({
integrations: [
starlight({
title: 'Mi encantador sitio de documentación',
}),
],
integrations: [
starlight({
title: 'Mi encantador sitio de documentación',
}),
],
});
```

Expand All @@ -42,18 +42,18 @@ Establece un logotipo para mostrarlo en la barra de navegación junto al título

```js
starlight({
logo: {
src: './src/assets/mi-logo.svg',
},
logo: {
src: './src/assets/mi-logo.svg',
},
});
```

#### `LogoConfig`

```ts
type LogoConfig = { alt?: string; replacesTitle?: boolean } & (
| { src: string }
| { light: string; dark: string }
| { src: string }
| { light: string; dark: string }
);
```

Expand All @@ -72,9 +72,9 @@ Hablita "Editar los enlaces" de está página estableciendo la URL base que se d

```js
starlight({
editLink: {
baseUrl: 'https://github.com/withastro/starlight/edit/main/',
},
editLink: {
baseUrl: 'https://github.com/withastro/starlight/edit/main/',
},
});
```

Expand All @@ -97,25 +97,25 @@ Cada elemento debe tener una propiedad `label` y una de las siguientes propiedad

```js
starlight({
sidebar: [
// Un solo elemento de enlace etiquetado como “Home”.
{ label: 'Home', link: '/' },
// Un grupo etiquetado como "Start Here" que contiene dos enlaces.
{
label: 'Start Here',
items: [
{ label: 'Introduction', link: '/intro' },
{ label: 'Next Steps', link: '/next-steps' },
],
},
// Un grupo que enlaza a todas las páginas del directorio de referencia.
{
label: 'Reference',
autogenerate: {
directory: 'reference',
},
},
],
sidebar: [
// Un solo elemento de enlace etiquetado como “Home”.
{ label: 'Home', link: '/' },
// Un grupo etiquetado como "Start Here" que contiene dos enlaces.
{
label: 'Start Here',
items: [
{ label: 'Introduction', link: '/intro' },
{ label: 'Next Steps', link: '/next-steps' },
],
},
// Un grupo que enlaza a todas las páginas del directorio de referencia.
{
label: 'Reference',
autogenerate: {
directory: 'reference',
},
},
],
});
```

Expand Down Expand Up @@ -182,34 +182,34 @@ sidebar: [

```ts
type SidebarItem = {
label: string;
translations?: Record<string, string>;
label: string;
translations?: Record<string, string>;
} & (
| {
link: string;
badge?: string | BadgeConfig;
attrs?: Record<string, string | number | boolean | undefined>;
}
| { items: SidebarItem[]; collapsed?: boolean }
| {
autogenerate: { directory: string; collapsed?: boolean };
collapsed?: boolean;
}
| {
link: string;
badge?: string | BadgeConfig;
attrs?: Record<string, string | number | boolean | undefined>;
}
| { items: SidebarItem[]; collapsed?: boolean }
| {
autogenerate: { directory: string; collapsed?: boolean };
collapsed?: boolean;
}
);
```

#### `BadgeConfig`

```ts
interface BadgeConfig {
text: string;
variant: 'note' | 'tip' | 'caution' | 'danger' | 'success' | 'default';
text: string;
variant: 'note' | 'tip' | 'caution' | 'danger' | 'success' | 'default';
}
```

### `locales`

**tipo:** <code>{ \[dir: string\]: [LocaleConfig](#localeconfig) }</code>
**tipo:** <code>\{ \[dir: string\]: [LocaleConfig](#localeconfig) \}</code>

[Configura la internacionalización (i18n)](/es/guides/i18n/) para tu sitio estableciendo qué `locales` se admiten.

Expand All @@ -221,39 +221,39 @@ import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';

export default defineConfig({
integrations: [
starlight({
title: 'My Docs',
// Establece el inglés como el idioma predeterminado para este sitio.
defaultLocale: 'en',
locales: {
// Los documentos en inglés en `src/content/docs/en/`
en: {
label: 'English',
},
// Los documentos en chino simplificado en `src/content/docs/zh-cn/`
'zh-cn': {
label: '简体中文',
lang: 'zh-CN',
},
// Los documentos en árabe en `src/content/docs/ar/`
ar: {
label: 'العربية',
dir: 'rtl',
},
},
}),
],
integrations: [
starlight({
title: 'My Docs',
// Establece el inglés como el idioma predeterminado para este sitio.
defaultLocale: 'en',
locales: {
// Los documentos en inglés en `src/content/docs/en/`
en: {
label: 'English',
},
// Los documentos en chino simplificado en `src/content/docs/zh-cn/`
'zh-cn': {
label: '简体中文',
lang: 'zh-CN',
},
// Los documentos en árabe en `src/content/docs/ar/`
ar: {
label: 'العربية',
dir: 'rtl',
},
},
}),
],
});
```

#### `LocaleConfig`

```ts
interface LocaleConfig {
label: string;
lang?: string;
dir?: 'ltr' | 'rtl';
label: string;
lang?: string;
dir?: 'ltr' | 'rtl';
}
```

Expand Down Expand Up @@ -283,15 +283,15 @@ Puedes servir el idioma predeterminado sin un directorio `/lang/` estableciendo

```js
starlight({
locales: {
root: {
label: 'English',
lang: 'en',
},
fr: {
label: 'Français',
},
},
locales: {
root: {
label: 'English',
lang: 'en',
},
fr: {
label: 'Français',
},
},
});
```

Expand All @@ -309,24 +309,26 @@ El idioma predeterminado se utilizará para proporcionar contenido de respaldo d

### `social`

**tipo:** `Partial<Record<'bitbucket' | 'codeberg' | 'codePen' | 'discord' | 'email' | 'facebook' | 'github' | 'gitlab' | 'gitter' | 'instagram' | 'linkedin' | 'mastodon' | 'microsoftTeams' | 'patreon' | 'reddit' | 'rss' | 'stackOverflow' | 'telegram' | 'threads' | 'twitch' | 'twitter' | 'x.com' | 'youtube', string>>`
import SocialLinksType from '../../../../components/social-links-type.astro';

**tipo:** <SocialLinksType />

Detalles opcionales sobre las cuentas de redes sociales para este sitio. Agregar cualquiera de estos los mostrará como enlaces de iconos en el encabezado del sitio.

```js
starlight({
social: {
codeberg: 'https://codeberg.org/knut/examples',
discord: 'https://astro.build/chat',
github: 'https://github.com/withastro/starlight',
linkedin: 'https://www.linkedin.com/company/astroinc',
mastodon: 'https://m.webtoo.ls/@astro',
threads: 'https://www.threads.net/@nmoodev',
twitch: 'https://www.twitch.tv/bholmesdev',
twitter: 'https://twitter.com/astrodotbuild',
'x.com': 'https://x.com/astrodotbuild',
youtube: 'https://youtube.com/@astrodotbuild',
},
social: {
codeberg: 'https://codeberg.org/knut/examples',
discord: 'https://astro.build/chat',
github: 'https://github.com/withastro/starlight',
linkedin: 'https://www.linkedin.com/company/astroinc',
mastodon: 'https://m.webtoo.ls/@astro',
threads: 'https://www.threads.net/@nmoodev',
twitch: 'https://www.twitch.tv/bholmesdev',
twitter: 'https://twitter.com/astrodotbuild',
'x.com': 'https://x.com/astrodotbuild',
youtube: 'https://youtube.com/@astrodotbuild',
},
});
```

Expand All @@ -340,7 +342,7 @@ Admite archivos CSS locales relativos a la raíz de tu proyecto, por ejemplo, `'

```js
starlight({
customCss: ['./src/custom-styles.css', '@fontsource/roboto'],
customCss: ['./src/custom-styles.css', '@fontsource/roboto'],
});
```

Expand All @@ -353,27 +355,27 @@ Puede ser útil para agregar análisis y otros scripts y recursos de terceros.

```js
starlight({
head: [
// Ejemplo: agregar etiqueta de script de análisis de Fathom.
{
tag: 'script',
attrs: {
src: 'https://cdn.usefathom.com/script.js',
'data-site': 'MY-FATHOM-ID',
defer: true,
},
},
],
head: [
// Ejemplo: agregar etiqueta de script de análisis de Fathom.
{
tag: 'script',
attrs: {
src: 'https://cdn.usefathom.com/script.js',
'data-site': 'MY-FATHOM-ID',
defer: true,
},
},
],
});
```

#### `HeadConfig`

```ts
interface HeadConfig {
tag: string;
attrs?: Record<string, string | boolean | undefined>;
content?: string;
tag: string;
attrs?: Record<string, string | boolean | undefined>;
content?: string;
}
```

Expand Down Expand Up @@ -445,9 +447,9 @@ Proporciona las rutas a los componentes para sobreescribir las implementaciones

```js
starlight({
components: {
SocialLinks: './src/components/MySocialLinks.astro',
},
components: {
SocialLinks: './src/components/MySocialLinks.astro',
},
});
```

Expand Down
2 changes: 1 addition & 1 deletion docs/src/content/docs/fr/guides/customization.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ defineConfig({

Starlight supporte par défaut l’ajout de liens vers vos comptes de médias sociaux dans l’en-tête du site via l’option [`social`](/reference/configuration/#social) dans l’intégration Starlight.

Actuellement, les liens vers Bitbucket, Codeberg, Codepen, Discord, un courriel, Facebook, GitHub, GitLab, Gitter, Instagram, LinkedIn, Mastodon, Microsoft Teams, un flux RSS, Stack Overflow, Telegram, Threads, Twitch, Twitter, X et Youtube sont pris en charge.
Vous pouvez retrouver une liste complète des icônes de liens prises en charge dans la [référence de configuration](/fr/reference/configuration/#social).
Faites-nous savoir sur GitHub ou Discord si vous avez besoin de la prise en charge d’un autre service !

```js
Expand Down
2 changes: 1 addition & 1 deletion docs/src/content/docs/fr/guides/i18n.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ Si une traduction n'est pas encore disponible pour une langue, Starlight affiche
En plus d'héberger des fichiers de contenu traduits, Starlight vous permet de traduire les chaînes de l'interface utilisateur par défaut (par exemple, l'en-tête "Sur cette page" dans la table des matières) afin que vos lecteurs puissent découvrir votre site entièrement dans la langue sélectionnée.

Les textes de l'interface utilisateur traduits en anglais, arabe, allemand, chinois simplifié, danois, espagnol, français, italien, japonais, néerlandais, norvégien, farsi, hébreu, portugais, tchèque, turc, coréen, indonésien, russe, suédois et vietnamien sont disponibles prêts à l'emploi, et nous acceptons les [contributions pour ajouter d'autres langues par défaut](https://github.com/withastro/starlight/blob/main/CONTRIBUTING.md).
Les textes de l'interface utilisateur traduits en anglais, arabe, allemand, chinois simplifié, danois, espagnol, français, italien, japonais, néerlandais, norvégien, farsi, hébreu, portugais, tchèque, turc, coréen, indonésien, russe, suédois, ukrainien et vietnamien sont disponibles prêts à l'emploi, et nous acceptons les [contributions pour ajouter d'autres langues par défaut](https://github.com/withastro/starlight/blob/main/CONTRIBUTING.md).
Vous pouvez fournir des traductions pour les langues supplémentaires que vous supportez - ou remplacer nos étiquettes par défaut - via la collection de données `i18n`.
Expand Down
Loading

0 comments on commit e39ae15

Please sign in to comment.