This content is not available in this language yet; it is shown in its original language.

← Back to all Posts

Guía de Markdown y componentes

3 min read

Este post de demostración recoge todo lo que puedes escribir en el contenido del sitio: Markdown estándar renderizado con Comark más componentes Svelte interactivos.

Texto y énfasis

Puedes usar negrita, cursiva, tachado y código en línea. Los enlaces apuntan a sitios como Astro y abren con normalidad.

Las citas en bloque sirven para destacar una idea o una referencia. Pueden ocupar varias líneas.

Listas

Lista sin orden:

  • Primer elemento
  • Segundo elemento

    • Anidado
  • Tercer elemento

Lista ordenada:

  1. Define la colección en src/config/collections.json
  2. Crea el contenido en src/content/
  3. El build genera las rutas automáticamente

Tabla

PiezaArchivoEdita en el CMS
Sitiosrc/config/site.jsonSite settings → Site
Idiomassrc/config/i18n.jsonSite settings → Languages
Textos UIsrc/config/ui.jsonSite settings → UI texts

Código

import { parse } from 'comark'
import highlight from 'comark/plugins/highlight'

const tree = await parse('# Hola **mundo**', { plugins: [highlight()] })
console.log(tree.nodes)

Imágenes

Las imágenes se optimizan en build automáticamente:

Captura de Sveltia CMS

Componente Alert

El componente Svelte Alert se invoca con la sintaxis de directiva de Comark y admite cuatro variantes:

Emojis

I love using Comark ❤️ 🚀

Great job! 👍 🎉

Tasks

  • Write the docs
  • Fix the bug
  • Ship it

Diagrams

CUSTOMER (no attributes) ORDER (no attributes) LINE-ITEM (no attributes) places contains
approved pass fail main develop feature/auth feature/ui PR Review release/1.0 Tests?

Notas a pie de página

The standard model[1] describes three of the four fundamental forces. Gravity remains described by general relativity[2].

Dark matter[3] accounts for approximately 27% of the universe.


Footnotes

  1. The Standard Model of particle physics classifies all known elementary particles.
  2. Einstein's general theory of relativity, published in 1915.
  3. Dark matter is inferred from gravitational effects on visible matter.