libreria-astro-lefebvre
Version:
Librería de componentes Astro, React y Vue para Lefebvre
60 lines (58 loc) • 2.47 kB
text/typescript
import type { ComponentMetadata } from '../interfaces/types';
export const metadata: ComponentMetadata = {
component_name: 'Cabecera_2025_Barcelona',
category: 'Header',
name: 'Breadcrumb 2025',
description: 'Breadcrumb reutilizable con icono de home configurable, niveles intermedios con sus propias URLs y último nivel sin enlace. Incluye structured data schema.org (BreadcrumbList) con URLs absolutas para SEO.',
framework: 'Astro',
priority: 1,
tags: ['breadcrumb', 'navegacion', 'seo'],
fields: [
{
name: 'homeLabel',
type: 'text',
help: 'Texto del primer nivel del breadcrumb (home). Admite HTML.',
label: 'Etiqueta del home',
mandatory: true,
example_value: 'GenIA-L'
},
{
name: 'items',
type: 'list',
help: 'Niveles intermedios del breadcrumb. Cada item tiene su propio enlace. El último nivel NO se incluye aquí.',
label: 'Niveles intermedios',
mandatory: false,
items: {
type: 'object',
fields: [
{ name: 'text', type: 'text', help: 'Texto del nivel intermedio. Admite HTML.', label: 'Texto', example_value: 'Categoría' },
{ name: 'url', type: 'text', help: 'URL de destino de este nivel intermedio.', label: 'URL', example_value: '/genia-l/categoria' }
]
}
},
{
name: 'text',
type: 'text',
help: 'Texto del último nivel del breadcrumb (la página actual). Admite HTML. No tiene enlace.',
label: 'Texto del último nivel',
mandatory: false,
example_value: 'Guía de fiscalidad para autónomos'
},
{
name: 'subdirectory',
type: 'text',
help: 'Ruta base del sitio (p. ej. "/genia-l"). Se usa para construir el enlace al inicio y la URL absoluta del breadcrumb en el structured data SEO. Déjalo vacío si el breadcrumb parte de la raíz',
label: 'Subdirectorio',
mandatory: false,
example_value: '/genia-l'
},
{
name: 'siteUrl',
type: 'text',
help: 'Origen público del sitio (protocolo + host, sin barra final, p. ej. "https://lefebvre.es"). Se usa para las URLs absolutas de los niveles intermedios del BreadcrumbList en el structured data SEO. Necesario en SSR tras un proxy, donde Astro.url resuelve al host interno (localhost). Si se deja vacío, se usa Astro.site o el host de la petición',
label: 'URL del sitio',
mandatory: false,
example_value: ''
}
]
};