feat: agregar datos estructurados de organización en formato JSON-LD en el perfil público
This commit is contained in:
@@ -76,6 +76,20 @@ export default async function OrganizationPublicProfile({ params, children }: Pr
|
|||||||
const { oid } = await params;
|
const { oid } = await params;
|
||||||
const orgData = await GetOrganizationData(oid);
|
const orgData = await GetOrganizationData(oid);
|
||||||
|
|
||||||
|
const baseUrl = process.env.NEXT_PUBLIC_BASE_URL || "https://turnosxpress.com.ar";
|
||||||
|
const canonicalUrl = `${baseUrl}/landing/org/${oid}`;
|
||||||
|
|
||||||
|
const jsonLd = {
|
||||||
|
"@context": "https://schema.org",
|
||||||
|
"@type": "Organization",
|
||||||
|
name: orgData.name,
|
||||||
|
url: canonicalUrl,
|
||||||
|
description:
|
||||||
|
orgData.description && orgData.description.trim().length > 0
|
||||||
|
? orgData.description
|
||||||
|
: `${orgData.name} - TurnosXpress`,
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<AnimatedContainer
|
<AnimatedContainer
|
||||||
color={orgData.headerColor}
|
color={orgData.headerColor}
|
||||||
@@ -89,6 +103,10 @@ export default async function OrganizationPublicProfile({ params, children }: Pr
|
|||||||
<div className="homeCentered">
|
<div className="homeCentered">
|
||||||
{orgData.id && (
|
{orgData.id && (
|
||||||
<>
|
<>
|
||||||
|
<script
|
||||||
|
type="application/ld+json"
|
||||||
|
dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }}
|
||||||
|
/>
|
||||||
<div style={{ position: "relative" }} id="header-wrapper">
|
<div style={{ position: "relative" }} id="header-wrapper">
|
||||||
<OrganizationHeader organization={orgData} />
|
<OrganizationHeader organization={orgData} />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user