Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions create/text.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,27 @@ Use MDX-style comments to add notes, reminders, or to-dos in your source files.
HTML-style `<!-- ... -->` comments are not supported in MDX. Always use `{/* ... */}`.
</Warning>

## Escape special characters

MDX treats `{` and `}` as the start and end of JSX expressions, and `<` as the start of a JSX tag. When you want these characters to render as literal text, escape them so MDX does not try to parse them.

| Character | How to escape |
| :--- | :--- |
| `{` and `}` | Wrap the character in backticks (`` `{` ``), use the HTML entity (`&#123;` for `{`, `&#125;` for `}`), or write it inside a JSX expression as a string (`{'{'}`). |
| `<` | Wrap in backticks (`` `<` ``), use the HTML entity `&lt;`, or write `{'<'}`. |
| `` ` `` | Use a backslash (`` \` ``) or wrap a longer span in double backticks (`` ``code with ` inside`` ``). |
| `\` | Use a double backslash (`\\`). |

```mdx Escape examples
Use the `{variable}` syntax to interpolate values.

The placeholder &#123;name&#125; renders as literal curly braces.

In JSX, write {'{ key: value }'} to display a literal object.
```

Inside fenced code blocks (```` ``` ````), MDX does not parse curly braces, so you can write `{variable}` directly without escaping. Escaping is only required in regular prose and inside JSX attributes.

## Best practices

### Content organization
Expand Down
23 changes: 23 additions & 0 deletions es/create/text.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,29 @@ Usa comentarios al estilo MDX para añadir notas, recordatorios o tareas pendien
Los comentarios al estilo HTML `<!-- ... -->` no son compatibles con MDX. Usa siempre `{/* ... */}`.
</Warning>

<div id="escape-special-characters">
## Escapar caracteres especiales
</div>

MDX trata `{` y `}` como el inicio y el final de una expresión JSX, y `<` como el inicio de una etiqueta JSX. Cuando quieras que estos caracteres se muestren como texto literal, escápalos para que MDX no intente analizarlos.

| Carácter | Cómo escaparlo |
| :--- | :--- |
| `{` y `}` | Envuelve el carácter en comillas invertidas (`` `{` ``), usa la entidad HTML (`&#123;` para `{`, `&#125;` para `}`) o escríbelo dentro de una expresión JSX como una cadena (`{'{'}`). |
| `<` | Envuelve en comillas invertidas (`` `<` ``), usa la entidad HTML `&lt;` o escribe `{'<'}`. |
| `` ` `` | Usa una barra invertida (`` \` ``) o envuelve un fragmento más largo en comillas invertidas dobles (`` ``código con ` dentro`` ``). |
| `\` | Usa una doble barra invertida (`\\`). |

```mdx Ejemplos de escape
Usa la sintaxis `{variable}` para interpolar valores.

El marcador &#123;name&#125; se muestra como llaves literales.

En JSX, escribe {'{ key: value }'} para mostrar un objeto literal.
```

Dentro de los bloques de código delimitados (```` ``` ````), MDX no analiza las llaves, por lo que puedes escribir `{variable}` directamente sin escapar. El escape solo es necesario en la prosa normal y dentro de los atributos JSX.

<div id="best-practices">
## Buenas prácticas
</div>
Expand Down
33 changes: 33 additions & 0 deletions es/organize/navigation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,39 @@ En el objeto `navigation`, `pages` es un array donde cada entrada debe hacer ref
}
```

<div id="mix-standalone-pages-with-groups">
### Combina páginas independientes con grupos
</div>

El objeto `navigation` de nivel superior admite un único patrón principal (por ejemplo, `pages` o `groups`), pero el array `pages` de un grupo puede combinar rutas de páginas como cadenas con objetos de grupos anidados. Usa este patrón para colocar una página independiente, como una página de resumen o de bienvenida, encima de otros grupos en la barra lateral.

Envuelve tu navegación en un único grupo de nivel superior y lista la página independiente antes de los grupos anidados:

```json
{
"navigation": {
"groups": [
{
"group": "Documentation",
"pages": [
"overview",
{
"group": "Get started",
"pages": ["quickstart", "installation"]
},
{
"group": "Guides",
"pages": ["guides/authentication", "guides/deployment"]
}
]
}
]
}
}
```

En este ejemplo, `overview` aparece como un enlace independiente en la parte superior de la barra lateral, seguido por los grupos `Get started` y `Guides`. También puedes usar la propiedad `root` en un grupo para designar una página de resumen para ese grupo. Consulta [Página raíz](/es/organize/navigation#root-page).

<div id="groups">
## Grupos
</div>
Expand Down
23 changes: 23 additions & 0 deletions fr/create/text.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,29 @@ Utilisez des commentaires de style MDX pour ajouter des notes, des rappels ou de
Les commentaires de style HTML `<!-- ... -->` ne sont pas pris en charge en MDX. Utilisez toujours `{/* ... */}`.
</Warning>

<div id="escape-special-characters">
## Échapper les caractères spéciaux
</div>

MDX interprète `{` et `}` comme le début et la fin d'une expression JSX, et `<` comme le début d'une balise JSX. Lorsque vous souhaitez que ces caractères s'affichent comme du texte littéral, échappez-les pour que MDX n'essaie pas de les analyser.

| Caractère | Comment l'échapper |
| :--- | :--- |
| `{` et `}` | Encadrez le caractère par des accents graves (`` `{` ``), utilisez l'entité HTML (`&#123;` pour `{`, `&#125;` pour `}`) ou écrivez-le dans une expression JSX sous forme de chaîne (`{'{'}`). |
| `<` | Encadrez par des accents graves (`` `<` ``), utilisez l'entité HTML `&lt;`, ou écrivez `{'<'}`. |
| `` ` `` | Utilisez une barre oblique inverse (`` \` ``) ou encadrez une plus longue portion par des doubles accents graves (`` ``code avec ` à l'intérieur`` ``). |
| `\` | Utilisez une double barre oblique inverse (`\\`). |

```mdx Exemples d'échappement
Utilisez la syntaxe `{variable}` pour interpoler des valeurs.

L'emplacement &#123;name&#125; s'affiche comme des accolades littérales.

En JSX, écrivez {'{ key: value }'} pour afficher un objet littéral.
```

Dans les blocs de code délimités (```` ``` ````), MDX n'analyse pas les accolades, vous pouvez donc écrire `{variable}` directement sans échappement. L'échappement n'est requis que dans le texte courant et à l'intérieur des attributs JSX.

<div id="best-practices">
## Bonnes pratiques
</div>
Expand Down
33 changes: 33 additions & 0 deletions fr/organize/navigation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,39 @@ Dans l&#39;objet `navigation`, `pages` est un tableau dont chaque entrée doit r
}
```

<div id="mix-standalone-pages-with-groups">
### Combiner des pages autonomes avec des groupes
</div>

L'objet `navigation` à la racine accepte un seul modèle principal (par exemple, `pages` ou `groups`), mais le tableau `pages` d'un groupe peut combiner des chemins de pages sous forme de chaînes avec des objets de groupes imbriqués. Utilisez ce pattern pour placer une page autonome, telle qu'une page d'aperçu ou de bienvenue, au-dessus des autres groupes dans la barre latérale.

Encapsulez votre navigation dans un seul groupe de premier niveau et listez la page autonome avant les groupes imbriqués :

```json
{
"navigation": {
"groups": [
{
"group": "Documentation",
"pages": [
"overview",
{
"group": "Get started",
"pages": ["quickstart", "installation"]
},
{
"group": "Guides",
"pages": ["guides/authentication", "guides/deployment"]
}
]
}
]
}
}
```

Dans cet exemple, `overview` apparaît comme un lien autonome en haut de la barre latérale, suivi des groupes `Get started` et `Guides`. Vous pouvez aussi utiliser la propriété `root` sur un groupe pour désigner une page d'aperçu pour ce groupe. Voir [Page racine](/fr/organize/navigation#root-page).

<div id="groups">
## Groupes
</div>
Expand Down
31 changes: 31 additions & 0 deletions organize/navigation.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Navigation"
description: "Configure your documentation site navigation with groups, pages, dropdowns, tabs, and anchors in docs.json to build a sidebar structure."

Check warning on line 3 in organize/navigation.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

organize/navigation.mdx#L3

Use 'JSON' instead of 'json'.
keywords: ["navigation structure", "sidebar configuration", "page organization", "navigation groups"]
boost: 3
---
Expand Down Expand Up @@ -43,6 +43,37 @@
}
```

### Mix standalone pages with groups

The top-level `navigation` object accepts one primary pattern (for example, `pages` or `groups`), but a group's `pages` array can mix string page paths with nested group objects. Use this to place a standalone page, such as an overview or welcome page, above other groups in the sidebar.

Wrap your navigation in a single top-level group and list the standalone page before the nested groups:

```json
{
"navigation": {
"groups": [
{
"group": "Documentation",
"pages": [
"overview",
{
"group": "Get started",
"pages": ["quickstart", "installation"]
},
{
"group": "Guides",
"pages": ["guides/authentication", "guides/deployment"]
}
]
}
]
}
}
```

In this example, `overview` appears as a standalone link at the top of the sidebar, followed by the `Get started` and `Guides` groups. You can also use the `root` property on a group to designate an overview page for that group. See [Root page](#root-page).

## Groups

Use groups to organize your sidebar navigation into sections. You can nest groups within each other, label them with tags, and style them with icons.
Expand Down Expand Up @@ -439,9 +470,9 @@
}
```

## Dropdowns

Check warning on line 473 in organize/navigation.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

organize/navigation.mdx#L473

Use 'dropdowns?' instead of 'Dropdowns'.

Dropdowns are an expandable menu at the top of your sidebar navigation. Each item in a dropdown directs to a section of your documentation.

Check warning on line 475 in organize/navigation.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

organize/navigation.mdx#L475

Use 'dropdowns?' instead of 'Dropdowns'.

<img
className="block dark:hidden pointer-events-none"
Expand Down Expand Up @@ -1011,9 +1042,9 @@

</CodeGroup>

## Breadcrumbs

Check warning on line 1045 in organize/navigation.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

organize/navigation.mdx#L1045

Use 'breadcrumbs?' instead of 'Breadcrumbs'.

Breadcrumbs display the full navigation path at the top of pages. Some themes have breadcrumbs enabled by default and others do not. You can control whether breadcrumbs display on your site using the `styling` property in your `docs.json`.

Check warning on line 1047 in organize/navigation.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

organize/navigation.mdx#L1047

Use 'breadcrumbs?' instead of 'Breadcrumbs'.

<CodeGroup>

Expand Down
Loading