libreria-astro-lefebvre 0.1.22 → 0.1.24
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 +1 -1
- package/src/carbins/Cabecera_2025_Barcelona.ts +8 -0
- package/src/carbins/Cabecera_2026_Madrid.ts +8 -0
- package/src/carbins/Formulario_2025_Nara.ts +16 -0
- package/src/carbins/Formulario_2025_Seul.ts +16 -0
- package/src/carbins/Formulario_2026_Wichita.ts +16 -0
- package/src/carbins/Indice_2025_Taiwan.ts +16 -0
- package/src/carbins/SEO_Head_Section.ts +16 -0
- package/src/components/Astro/Cabecera_2025_Barcelona.astro +8 -5
- package/src/components/Astro/Formulario_2025_Nara.astro +8 -1
- package/src/components/Astro/Formulario_2025_Seul.astro +9 -2
- package/src/components/Astro/Formulario_2026_Wichita.astro +8 -1
- package/src/components/Astro/Galeria_2026_Segorbe.astro +1 -1
- package/src/components/Astro/Indice_2025_Taiwan.astro +7 -1
package/package.json
CHANGED
|
@@ -46,6 +46,14 @@ export const metadata: ComponentMetadata = {
|
|
|
46
46
|
label: 'Subdirectorio',
|
|
47
47
|
mandatory: false,
|
|
48
48
|
example_value: '/genia-l'
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
name: 'siteUrl',
|
|
52
|
+
type: 'text',
|
|
53
|
+
help: 'Origen público del sitio (protocolo + host, sin barra final, p. ej. "https://lefebvre.es"). Se usa para las URLs absolutas 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',
|
|
54
|
+
label: 'URL del sitio',
|
|
55
|
+
mandatory: false,
|
|
56
|
+
example_value: ''
|
|
49
57
|
}
|
|
50
58
|
]
|
|
51
59
|
};
|
|
@@ -56,6 +56,14 @@ export const metadata: ComponentMetadata = {
|
|
|
56
56
|
{ name: 'target', type: 'select', help: 'Cómo se abre el enlace: "_self" en la misma pestaña, "_blank" en una pestaña nueva', label: 'Apertura del enlace', options: ['_self', '_blank'], options_labels: ['Misma pestaña', 'Nueva pestaña'], example_value: '_self' },
|
|
57
57
|
]
|
|
58
58
|
}
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
name: 'siteUrl',
|
|
62
|
+
type: 'text',
|
|
63
|
+
help: 'Origen público del sitio (protocolo + host, sin barra final, p. ej. "https://lefebvre.es"). Se usa para la URL del SiteNavigationElement 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',
|
|
64
|
+
label: 'URL del sitio',
|
|
65
|
+
mandatory: false,
|
|
66
|
+
example_value: ''
|
|
59
67
|
}
|
|
60
68
|
]
|
|
61
69
|
};
|
|
@@ -40,6 +40,22 @@ export const metadata: ComponentMetadata = {
|
|
|
40
40
|
label: 'Texto del botón',
|
|
41
41
|
mandatory: false,
|
|
42
42
|
example_value: 'Suscríbete'
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: 'subdirectory',
|
|
46
|
+
type: 'text',
|
|
47
|
+
help: 'Ruta base del sitio (p. ej. "/genia-l"). Se antepone a la ruta al construir la URL absoluta del "target" en el structured data SEO. Déjalo vacío si el sitio cuelga de la raíz',
|
|
48
|
+
label: 'Subdirectorio',
|
|
49
|
+
mandatory: false,
|
|
50
|
+
example_value: ''
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: 'siteUrl',
|
|
54
|
+
type: 'text',
|
|
55
|
+
help: 'Origen público del sitio (protocolo + host, sin barra final, p. ej. "https://lefebvre.es"). Se usa para la URL absoluta del "target" 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',
|
|
56
|
+
label: 'URL del sitio',
|
|
57
|
+
mandatory: false,
|
|
58
|
+
example_value: ''
|
|
43
59
|
}
|
|
44
60
|
]
|
|
45
61
|
};
|
|
@@ -76,6 +76,22 @@ export const metadata: ComponentMetadata = {
|
|
|
76
76
|
options: ['false', 'true'],
|
|
77
77
|
options_labels: ['Falso', 'Verdadero'],
|
|
78
78
|
example_value: true
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
name: 'subdirectory',
|
|
82
|
+
type: 'text',
|
|
83
|
+
help: 'Ruta base del sitio (p. ej. "/genia-l"). Se antepone a la ruta al construir la URL absoluta del "target" en el structured data SEO. Déjalo vacío si el sitio cuelga de la raíz',
|
|
84
|
+
label: 'Subdirectorio',
|
|
85
|
+
mandatory: false,
|
|
86
|
+
example_value: ''
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
name: 'siteUrl',
|
|
90
|
+
type: 'text',
|
|
91
|
+
help: 'Origen público del sitio (protocolo + host, sin barra final, p. ej. "https://lefebvre.es"). Se usa para la URL absoluta del "target" 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',
|
|
92
|
+
label: 'URL del sitio',
|
|
93
|
+
mandatory: false,
|
|
94
|
+
example_value: ''
|
|
79
95
|
}
|
|
80
96
|
]
|
|
81
97
|
};
|
|
@@ -58,5 +58,21 @@ export const metadata: ComponentMetadata = {
|
|
|
58
58
|
options_labels: ['Izquierda', 'Derecha'],
|
|
59
59
|
example_value: 'left'
|
|
60
60
|
},
|
|
61
|
+
{
|
|
62
|
+
name: 'subdirectory',
|
|
63
|
+
type: 'text',
|
|
64
|
+
help: 'Ruta base del sitio (p. ej. "/genia-l"). Se antepone a la ruta al construir la URL absoluta del "target" en el structured data SEO. Déjalo vacío si el sitio cuelga de la raíz',
|
|
65
|
+
label: 'Subdirectorio',
|
|
66
|
+
mandatory: false,
|
|
67
|
+
example_value: ''
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
name: 'siteUrl',
|
|
71
|
+
type: 'text',
|
|
72
|
+
help: 'Origen público del sitio (protocolo + host, sin barra final, p. ej. "https://lefebvre.es"). Se usa para la URL absoluta del "target" 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',
|
|
73
|
+
label: 'URL del sitio',
|
|
74
|
+
mandatory: false,
|
|
75
|
+
example_value: ''
|
|
76
|
+
},
|
|
61
77
|
]
|
|
62
78
|
};
|
|
@@ -30,6 +30,22 @@ export const metadata: ComponentMetadata = {
|
|
|
30
30
|
{ name: 'enlace', type: 'text', help: 'ID del elemento destino de la misma página, SIN el "#" (el componente lo añade automáticamente). Si se deja vacío, se GENERA automáticamente desde el título: minúsculas, sin acentos, espacios a guiones y sin caracteres especiales (p. ej. "Qué es GenIA-L" → "que-es-genial"). El elemento con ese id debe existir en la página', label: 'ID del ancla (sin #)', example_value: 'introduccion' }
|
|
31
31
|
]
|
|
32
32
|
}
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
name: 'subdirectory',
|
|
36
|
+
type: 'text',
|
|
37
|
+
help: 'Ruta base del sitio (p. ej. "/genia-l"). Se antepone a la ruta al construir la URL absoluta de los anclas en el structured data SEO (ItemList). Déjalo vacío si el sitio cuelga de la raíz',
|
|
38
|
+
label: 'Subdirectorio',
|
|
39
|
+
mandatory: false,
|
|
40
|
+
example_value: ''
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
name: 'siteUrl',
|
|
44
|
+
type: 'text',
|
|
45
|
+
help: 'Origen público del sitio (protocolo + host, sin barra final, p. ej. "https://lefebvre.es"). Se usa para las URLs absolutas del ItemList 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',
|
|
46
|
+
label: 'URL del sitio',
|
|
47
|
+
mandatory: false,
|
|
48
|
+
example_value: ''
|
|
33
49
|
}
|
|
34
50
|
]
|
|
35
51
|
};
|
|
@@ -50,5 +50,21 @@ export const metadata: ComponentMetadata = {
|
|
|
50
50
|
options_labels: ['Indexar y seguir enlaces', 'No indexar ni seguir enlaces', 'Indexar pero no seguir enlaces', 'No indexar pero seguir enlaces'],
|
|
51
51
|
example_value: 'index, follow'
|
|
52
52
|
},
|
|
53
|
+
{
|
|
54
|
+
name: 'subdirectory',
|
|
55
|
+
type: 'text',
|
|
56
|
+
help: 'Ruta base del sitio (p. ej. "/genia-l"). Se antepone al host al construir el canonical y las URLs absolutas. Déjalo vacío si el sitio cuelga de la raíz',
|
|
57
|
+
label: 'Subdirectorio',
|
|
58
|
+
mandatory: false,
|
|
59
|
+
example_value: ''
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
name: 'siteUrl',
|
|
63
|
+
type: 'text',
|
|
64
|
+
help: 'Origen público del sitio (protocolo + host, sin barra final, p. ej. "https://lefebvre.es"). 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',
|
|
65
|
+
label: 'URL del sitio',
|
|
66
|
+
mandatory: false,
|
|
67
|
+
example_value: ''
|
|
68
|
+
},
|
|
53
69
|
]
|
|
54
70
|
};
|
|
@@ -4,18 +4,21 @@ const {
|
|
|
4
4
|
items = [],
|
|
5
5
|
text,
|
|
6
6
|
subdirectory = "",
|
|
7
|
+
siteUrl = "",
|
|
7
8
|
} = Astro.props;
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
// Origen absoluto para el JSON-LD de breadcrumbs. En SSR tras un proxy, Astro.url resuelve
|
|
11
|
+
// al host interno (localhost), así que se prioriza `siteUrl` (prop) y `Astro.site` (config).
|
|
12
|
+
const origin = (siteUrl || Astro.site?.href || Astro.url.origin).replace(/\/+$/, '');
|
|
12
13
|
|
|
13
|
-
const
|
|
14
|
+
const currentUrl = new URL(subdirectory + Astro.url.pathname, origin).href;
|
|
15
|
+
|
|
16
|
+
const homeUrl = new URL(subdirectory + '/', origin).href;
|
|
14
17
|
|
|
15
18
|
const toAbsoluteUrl = (url: string) => {
|
|
16
19
|
if (!url) return null;
|
|
17
20
|
try {
|
|
18
|
-
return new URL(url,
|
|
21
|
+
return new URL(url, origin).href;
|
|
19
22
|
} catch {
|
|
20
23
|
return null;
|
|
21
24
|
}
|
|
@@ -5,6 +5,8 @@ const {
|
|
|
5
5
|
description = "Recibe novedades de artículos que se publican en el blog",
|
|
6
6
|
lf2FormTitle = "",
|
|
7
7
|
businessAction = false,
|
|
8
|
+
subdirectory = '',
|
|
9
|
+
siteUrl = '',
|
|
8
10
|
} = Astro.props;
|
|
9
11
|
|
|
10
12
|
const idTargetLf2 = 'lf2-form-' + Math.random().toString(36).substring(2, 15);
|
|
@@ -12,6 +14,11 @@ const forceSkeleton = !lf2FormTitle;
|
|
|
12
14
|
|
|
13
15
|
const escapeJson = (s = "") => String(s).replace(/<[^>]*>/g, '').replace(/\\/g, '\\\\').replace(/"/g, '\\"').replace(/</g, '\\u003c').replace(/>/g, '\\u003e').replace(/[\n\r\t]+/g, ' ');
|
|
14
16
|
|
|
17
|
+
// Página actual en absoluto para el `target`. Prioriza siteUrl/Astro.site sobre Astro.url (que
|
|
18
|
+
// en SSR tras proxy es localhost) y añade el subdirectorio (Astro.url.pathname no lo incluye).
|
|
19
|
+
const origin = (siteUrl || Astro.site?.href || Astro.url.origin).replace(/\/+$/, '');
|
|
20
|
+
const pageUrl = new URL(subdirectory + Astro.url.pathname, origin).href;
|
|
21
|
+
|
|
15
22
|
const structuredData = `<script type="application/ld+json">
|
|
16
23
|
{
|
|
17
24
|
"@context": "https://schema.org",
|
|
@@ -21,7 +28,7 @@ const structuredData = `<script type="application/ld+json">
|
|
|
21
28
|
"potentialAction": {
|
|
22
29
|
"@type": "SubscribeAction",
|
|
23
30
|
"name": "${escapeJson(lf2FormTitle)}",
|
|
24
|
-
"target": "${
|
|
31
|
+
"target": "${pageUrl}"
|
|
25
32
|
}
|
|
26
33
|
}
|
|
27
34
|
</script>`;
|
|
@@ -9,7 +9,9 @@ const {
|
|
|
9
9
|
imageSrc,
|
|
10
10
|
lf2FormTitle = "",
|
|
11
11
|
businessAction = false,
|
|
12
|
-
loading = "lazy"
|
|
12
|
+
loading = "lazy",
|
|
13
|
+
subdirectory = '',
|
|
14
|
+
siteUrl = '',
|
|
13
15
|
} = Astro.props;
|
|
14
16
|
|
|
15
17
|
const imageSrcUrl = extractImageUrl(imageSrc);
|
|
@@ -18,6 +20,11 @@ const forceSkeleton = !lf2FormTitle;
|
|
|
18
20
|
|
|
19
21
|
const escapeJson = (s = "") => String(s).replace(/<[^>]*>/g, '').replace(/\\/g, '\\\\').replace(/"/g, '\\"').replace(/</g, '\\u003c').replace(/>/g, '\\u003e').replace(/[\n\r\t]+/g, ' ');
|
|
20
22
|
|
|
23
|
+
// Página actual en absoluto para el `target`. Prioriza siteUrl/Astro.site sobre Astro.url (que
|
|
24
|
+
// en SSR tras proxy es localhost) y añade el subdirectorio (Astro.url.pathname no lo incluye).
|
|
25
|
+
const origin = (siteUrl || Astro.site?.href || Astro.url.origin).replace(/\/+$/, '');
|
|
26
|
+
const pageUrl = new URL(subdirectory + Astro.url.pathname, origin).href;
|
|
27
|
+
|
|
21
28
|
const structuredData = `<script type="application/ld+json">
|
|
22
29
|
{
|
|
23
30
|
"@context": "https://schema.org",
|
|
@@ -27,7 +34,7 @@ const structuredData = `<script type="application/ld+json">
|
|
|
27
34
|
"potentialAction": {
|
|
28
35
|
"@type": "CommunicateAction",
|
|
29
36
|
"name": "${escapeJson(lf2FormTitle)}",
|
|
30
|
-
"target": "${
|
|
37
|
+
"target": "${pageUrl}"
|
|
31
38
|
}
|
|
32
39
|
}
|
|
33
40
|
</script>`;
|
|
@@ -9,6 +9,8 @@ const {
|
|
|
9
9
|
orientation = "left",
|
|
10
10
|
lf2FormTitle = "",
|
|
11
11
|
businessAction = false,
|
|
12
|
+
subdirectory = '',
|
|
13
|
+
siteUrl = '',
|
|
12
14
|
} = Astro.props;
|
|
13
15
|
|
|
14
16
|
const idTargetLf2 = 'lf2-form-' + Math.random().toString(36).substring(2, 15);
|
|
@@ -16,6 +18,11 @@ const forceSkeleton = !lf2FormTitle;
|
|
|
16
18
|
|
|
17
19
|
const escapeJson = (s = "") => String(s).replace(/<[^>]*>/g, '').replace(/\\/g, '\\\\').replace(/"/g, '\\"').replace(/</g, '\\u003c').replace(/>/g, '\\u003e').replace(/[\n\r\t]+/g, ' ');
|
|
18
20
|
|
|
21
|
+
// Página actual en absoluto para el `target`. Prioriza siteUrl/Astro.site sobre Astro.url (que
|
|
22
|
+
// en SSR tras proxy es localhost) y añade el subdirectorio (Astro.url.pathname no lo incluye).
|
|
23
|
+
const origin = (siteUrl || Astro.site?.href || Astro.url.origin).replace(/\/+$/, '');
|
|
24
|
+
const pageUrl = new URL(subdirectory + Astro.url.pathname, origin).href;
|
|
25
|
+
|
|
19
26
|
const structuredData = `<script type="application/ld+json">
|
|
20
27
|
{
|
|
21
28
|
"@context": "https://schema.org",
|
|
@@ -25,7 +32,7 @@ const structuredData = `<script type="application/ld+json">
|
|
|
25
32
|
"potentialAction": {
|
|
26
33
|
"@type": "CommunicateAction",
|
|
27
34
|
"name": "${escapeJson(lf2FormTitle)}",
|
|
28
|
-
"target": "${
|
|
35
|
+
"target": "${pageUrl}"
|
|
29
36
|
}
|
|
30
37
|
}
|
|
31
38
|
</script>`;
|
|
@@ -47,7 +47,7 @@ const structuredData = `<script type="application/ld+json">
|
|
|
47
47
|
src={extractImageUrl(item.image)}
|
|
48
48
|
alt={item.alt || 'Imagen de la galería'}
|
|
49
49
|
loading="lazy"
|
|
50
|
-
class="w-full h-auto rounded-xl"
|
|
50
|
+
class="w-full h-auto rounded-xl transition-shadow duration-300 hover:shadow-sm"
|
|
51
51
|
/>
|
|
52
52
|
</figure>
|
|
53
53
|
))}
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
const {
|
|
4
4
|
titulo,
|
|
5
5
|
items,
|
|
6
|
+
subdirectory = '',
|
|
7
|
+
siteUrl = '',
|
|
6
8
|
} = Astro.props;
|
|
7
9
|
|
|
8
10
|
interface IndiceItem {
|
|
@@ -16,7 +18,11 @@ const indiceItems = ((items || []) as IndiceItem[]).map(item => ({
|
|
|
16
18
|
}));
|
|
17
19
|
|
|
18
20
|
const escapeJson = (s = "") => String(s).replace(/<[^>]*>/g, '').replace(/\\/g, '\\\\').replace(/"/g, '\\"').replace(/</g, '\\u003c').replace(/>/g, '\\u003e').replace(/[\n\r\t]+/g, ' ');
|
|
19
|
-
|
|
21
|
+
// Base absoluta para los anclajes del índice. En SSR tras un proxy, Astro.url resuelve al host
|
|
22
|
+
// interno (localhost), así que se prioriza `siteUrl` (prop) y `Astro.site` (config), y se añade
|
|
23
|
+
// el subdirectorio porque Astro.url.pathname no lo incluye cuando el proxy lo elimina.
|
|
24
|
+
const origin = (siteUrl || Astro.site?.href || Astro.url.origin).replace(/\/+$/, '');
|
|
25
|
+
const baseUrl = new URL(subdirectory + Astro.url.pathname, origin).href.split('#')[0];
|
|
20
26
|
|
|
21
27
|
const structuredData = `<script type="application/ld+json">
|
|
22
28
|
{
|