libreria-astro-lefebvre 0.1.35 → 0.1.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "libreria-astro-lefebvre",
3
- "version": "0.1.35",
3
+ "version": "0.1.36",
4
4
  "description": "Librería de componentes Astro, React y Vue para Lefebvre",
5
5
  "author": "Equipo web desarrollo Lefebvre",
6
6
  "type": "module",
@@ -45,6 +45,7 @@ export const metadata: ComponentMetadata = {
45
45
  { name: 'image', type: 'image', help: 'Imagen de la card (aparece en la parte superior). Se renderiza siempre; si se deja vacía aparece una imagen rota', label: 'Imagen', example_value: 'https://assets.lefebvre.es/media/img/preview-comp/comp-16-9.png' },
46
46
  { name: 'altImage', type: 'text', help: 'Texto alternativo de la imagen para accesibilidad', label: 'Alt de la imagen', example_value: 'Captura de la interfaz de GenIA-L generando un contrato automáticamente' },
47
47
  { name: 'author', type: 'text', help: 'Nombre del autor del contenido. Se incluye SIEMPRE en los datos estructurados (JSON-LD author). Solo se muestra visualmente como "Por [nombre]" si "Mostrar autor en la card" está activado. Si se deja vacío, no se emite autoría', label: 'Nombre del autor', example_value: 'María García López' },
48
+ { name: 'authorUrl', type: 'text', help: 'Url a la ficha del autor del contenido. Se incluye SIEMPRE en los datos estructurados (JSON-LD author). Si se deja vacío, no se emite autoría', label: 'Url del autor', example_value: 'https://lefebvre.es/genia-l/blog/autor/maria-garcia-lopez/' },
48
49
  { name: 'authorType', type: 'select', options: ['Person', 'Organization'], options_labels: ['Persona', 'Organización'], help: 'Tipo schema.org del autor en el JSON-LD. Usar "Organización" cuando el autor sea la propia entidad (p. ej. "Lefebvre"); en el resto de casos, "Persona". Default: Persona', label: 'Tipo de autor (SEO)', example_value: 'Person' },
49
50
  { name: 'datePublished', type: 'text', help: 'Fecha de publicación en formato ISO 8601 para los datos estructurados (JSON-LD datePublished). No se muestra visualmente. Ej: 2026-01-10T00:00:00.000Z', label: 'Fecha publicación (ISO)', example_value: '2026-01-10T00:00:00.000Z' },
50
51
  { name: 'keywords', type: 'text', help: 'Palabras clave reales para los datos estructurados (JSON-LD keywords), separadas por comas. Se muestran como badge si "Etiqueta visible" es Keywords', label: 'Keywords (SEO)', example_value: 'Legaltech, Contratos, IA' }
@@ -10,6 +10,7 @@ interface MontevideoItem {
10
10
  title?: string;
11
11
  fecha?: string; // etiqueta de fecha para mostrar (badge)
12
12
  author?: string;
13
+ authorUrl?: string;
13
14
  authorType?: 'Person' | 'Organization'; // tipo schema.org del autor en el JSON-LD
14
15
  description?: string;
15
16
  datePublished?: string; // ISO 8601, para JSON-LD
@@ -38,7 +39,7 @@ const structuredData = `<script type="application/ld+json">
38
39
  "description": "${escapeJson(item.description)}"${item.image ? `,
39
40
  "image": "${escapeJson(extractImageUrl(item.image))}"` : ""}${item.link ? `,
40
41
  "url": "${escapeJson(item.link)}"` : ""}${item.author ? `,
41
- "author": { "@type": "${item.authorType === 'Organization' ? 'Organization' : 'Person'}", "name": "${escapeJson(item.author)}" }` : ""}${item.datePublished ? `,
42
+ "author": { "@type": "${item.authorType === 'Organization' ? 'Organization' : 'Person'}", "name": "${escapeJson(item.author)}", "url": "${escapeJson(item.authorUrl)}" }` : ""}${item.datePublished ? `,
42
43
  "datePublished": "${escapeJson(item.datePublished)}"` : ""}${item.keywords ? `,
43
44
  "keywords": "${escapeJson(item.keywords)}"` : ""}
44
45
  }