-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Translation to Spanish ' docs / docs / mdx /index.md' #16
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,66 +1,66 @@ | ||
--- | ||
title: Adding Components to Markdown with MDX | ||
El titulo: Agregar de componentes a Markdown con MDX | ||
--- | ||
|
||
When writing long-form content in Markdown you might want to embed [components](/docs/glossary/#component). | ||
This is often achieved by either writing content in JSX or using plugins that | ||
use custom syntax. The first approach isn't optimal because JSX isn't the best | ||
format for content and can make it less approachable to members of a team. Custom | ||
syntax and plugins are often too inflexible and don't promote composition. If | ||
you're finding yourself wanting to add components to your content you can use | ||
`gatsby-plugin-mdx` which is a Gatsby plugin to integrate MDX into your project. | ||
Al escribir contenido en forma larga en Markdown es posible que desee incrustar [componentes](/docs/glossary/#component). | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Al escribir contenido extenso en Markdown, es posible que quieras agregar [componentes (/docs/glossary/#component). |
||
Esto a menudo se consigue o bien escribiendo contenido en JSX o usando plugins que usan una sintáxis especial. | ||
El primer enfoque no es óptimo porque JSX no es el mejor | ||
el formato para el contenido y lo puede hacer menos tratable a miembros de un equipo. La sintaxis | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. formato para el contenido y lo puedes hacer menos accesible para miembros de tu equipo. La sintaxis... |
||
personalizada y los plugins son a menudo demasiado inflexibles y no promueven la composición. Si | ||
se encuentra queriendo añadir componentes a su contenido puede usar | ||
`gatsby-plugin-mdx` que es un enchufe de unión de Gatsby para integrar MDX en su proyecto. | ||
YzahFe marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
## What's MDX? | ||
## ¿Qué es MDX? | ||
|
||
[MDX][mdx] is Markdown for the component era. | ||
It lets you write JSX embedded inside Markdown. | ||
It’s a great combination because it allows you to use Markdown’s terse | ||
syntax (such as `# Heading`) for your content and JSX for more advanced, | ||
or reusable components. | ||
[MDX][mdx] es Markdown para la era de los componentes. | ||
Le permite escribir JSX incrustado dentro de Markdown. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Te permite escribir JSX incrustado dentro de Markdown. |
||
Es una excelente combinación porque permite usar Markdown es ser conciso | ||
Sintaxis (como `# Heading`) para su contenido y JSX para más avanzadas, | ||
o componentes reutilizables. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Es una excelente combinación porque permite usar la sintaxis de Markdown (como |
||
|
||
This is useful in content-driven sites where you want the ability | ||
to introduce components like charts or alerts without having to | ||
configure a plugin. It emphasizes composition over configuration | ||
and really shines with interactive blog posts, documenting design | ||
systems, or long form articles with immersive or dynamic | ||
interactions. | ||
Esto es útil en sitios basados en contenido donde desea la capacidad | ||
de introducir componentes como gráficos o alertas sin tener que | ||
configurar un complemento. Hace hincapié en la composición sobre la configuración | ||
y realmente brilla con entradas de blog interactivas, documentos de diseño | ||
sistemas o artículos de forma larga con interacciones | ||
inmersivas o dinámicas. | ||
|
||
When using MDX you can also import other MDX documents and render | ||
them as components. This lets you write something like an FAQ | ||
page in one place and reuse it throughout your website. | ||
Al utilizar MDX, también puede importar otros documentos MDX y renderizarlos | ||
them como componentes. Esto le permite escribir algo como una página de preguntas frecuentes | ||
página en un solo lugar y reutilizarlo en todo su sitio web. | ||
|
||
## What does it look like in practice? | ||
## ¿Cómo se ve en la práctica? | ||
|
||
Importing and JSX syntax works just like it does in your components. This | ||
results in a seamless experience for developers and content authors alike. | ||
Markdown and JSX are included alongside each other like this: | ||
Importar y la sintaxis de JSX funciona igual que en sus componentes. Este | ||
resulta en una experiencia sin fisuras tanto para desarrolladores como para autores de contenido. | ||
Markdown y JSX se incluyen uno al lado del otro así: | ||
|
||
```md | ||
import { Chart } from '../components/chart' | ||
|
||
# Here’s a chart | ||
# Aquí hay un gráfico | ||
|
||
The chart is rendered inside our MDX document. | ||
El gráfico se representa dentro de nuestro documento MDX. | ||
|
||
<Chart /> | ||
``` | ||
|
||
## Features | ||
## La característica | ||
|
||
❤️ **Powerful**: MDX blends Markdown and JSX syntax to fit perfectly in | ||
React/JSX-based projects. | ||
❤️ **Poderoso**: MDX combina Markdown y JSX sintaxis para encajar perfectamente en | ||
Reaccionar/JSX proyectos basados en. | ||
|
||
💻 **Everything is a component**: Use existing components inside your | ||
MDX and import other MDX files as plain components. | ||
💻 **Todo es un componente**: Utilizar los componentes existentes dentro de su | ||
MDX y la importación de otros MDX archivos como plain componentes. | ||
|
||
🔧 **Customizable**: Decide which component is rendered for each Markdown | ||
🔧 **Personalizar**: Decida qué componente se representa para cada Markdown | ||
element (`{ h1: MyHeading }`). | ||
|
||
📚 **Markdown-based**: The simplicity and elegance of markdown remains; | ||
you interleave JSX only when you want to. | ||
📚 **Basado en Markdown**: La sencillez y la elegancia del markdown permanece; | ||
Usted interleave JSX sólo cuando desee. | ||
|
||
🔥 **Blazingly blazing fast**: MDX has no runtime, all compilation occurs | ||
during the build stage. | ||
🔥 **Increíblemente veloz**: MDX no tiene tiempo de ejecución, todas la compilación se produce | ||
Durante la etapa de creación. | ||
|
||
<GuideList slug={props.slug} /> | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
El titulo: Agregar componentes a Markdown con MDX