fix: home page jsonLd and move bg video
This commit is contained in:
parent
b064367fd7
commit
86c8e2a929
@ -1,14 +1,21 @@
|
|||||||
import Parallax from "./home-bg-video/page";
|
|
||||||
import Homepage from "@/components/Homepage";
|
import Homepage from "@/components/Homepage";
|
||||||
import { BeforeFooterBlock } from "@/components/Blocks/BeforeFooter";
|
import { BeforeFooterBlock } from "@/components/Blocks/BeforeFooter";
|
||||||
import { Metadata, Viewport } from "next";
|
import { Metadata, Viewport } from "next";
|
||||||
import { getDefaultMetadata } from "@/utils/metadata";
|
import { getDefaultMetadata } from "@/utils/metadata";
|
||||||
|
import HomeBgVideo from "@/components/HomeBgVideo";
|
||||||
|
import { headers } from "next/headers";
|
||||||
|
|
||||||
export async function generateMetadata(): Promise<Metadata> {
|
export async function generateMetadata(): Promise<Metadata> {
|
||||||
const defaultMetadata = await getDefaultMetadata();
|
const defaultMetadata = await getDefaultMetadata();
|
||||||
defaultMetadata.title = `Homepage - ${defaultMetadata.openGraph?.siteName}`;
|
defaultMetadata.title = `Homepage - ${defaultMetadata.openGraph?.siteName}`;
|
||||||
defaultMetadata.description =
|
defaultMetadata.description =
|
||||||
"Get compassionate care and excellent medical services from COCHISE ONCOLOGY in Sierra Vista, Arizona. We are the largest full-service cancer treatment center between Albuquerque, New Mexico and Tucson, Arizona.";
|
"Get compassionate care and excellent medical services from COCHISE ONCOLOGY in Sierra Vista, Arizona. We are the largest full-service cancer treatment center between Albuquerque, New Mexico and Tucson, Arizona.";
|
||||||
|
defaultMetadata.keywords = "Cochise Oncology, Oncology, Healthcare, Medical Services, Cancer Treatment";
|
||||||
|
|
||||||
|
if (!!defaultMetadata?.openGraph) {
|
||||||
|
defaultMetadata.openGraph.images = ["/assets/images/cochise-welcome.png"];
|
||||||
|
}
|
||||||
|
|
||||||
return defaultMetadata;
|
return defaultMetadata;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -17,10 +24,118 @@ export const viewport: Viewport = {
|
|||||||
initialScale: 1,
|
initialScale: 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
export default function Home() {
|
export default async function Home() {
|
||||||
|
const headersList = await headers();
|
||||||
|
const fullUrl = headersList.get("x-full-url");
|
||||||
|
const siteName = headersList.get("x-site-name");
|
||||||
|
|
||||||
|
const jsonLd = {
|
||||||
|
"@context": "https://schema.org",
|
||||||
|
"@graph": [
|
||||||
|
{
|
||||||
|
"@type": "WebPage",
|
||||||
|
"@id": fullUrl,
|
||||||
|
url: fullUrl,
|
||||||
|
name: `Homepage - ${siteName}`,
|
||||||
|
isPartOf: {
|
||||||
|
"@id": `${fullUrl}#website`,
|
||||||
|
},
|
||||||
|
about: {
|
||||||
|
"@id": `${fullUrl}#organization`,
|
||||||
|
},
|
||||||
|
primaryImageOfPage: {
|
||||||
|
"@id": `${fullUrl}#primaryimage`,
|
||||||
|
},
|
||||||
|
image: {
|
||||||
|
"@id": `${fullUrl}#primaryimage`,
|
||||||
|
},
|
||||||
|
thumbnailUrl: [`${fullUrl}assets/images/cochise-welcome.png`],
|
||||||
|
datePublished: "2024-07-18T16:29:29+00:00",
|
||||||
|
dateModified: "2025-02-24T21:01:50+00:00",
|
||||||
|
description:
|
||||||
|
"Get compassionate care and excellent medical services from COCHISE ONCOLOGY in Sierra Vista, Arizona. We are the largest full-service cancer treatment center between Albuquerque, New Mexico and Tucson, Arizona.",
|
||||||
|
breadcrumb: {
|
||||||
|
"@id": `${fullUrl}#breadcrumb`,
|
||||||
|
},
|
||||||
|
inLanguage: "en-US",
|
||||||
|
potentialAction: [
|
||||||
|
{
|
||||||
|
"@type": "ReadAction",
|
||||||
|
target: [fullUrl],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"@type": "ImageObject",
|
||||||
|
inLanguage: "en-US",
|
||||||
|
"@id": `${fullUrl}#primaryimage`,
|
||||||
|
url: `${fullUrl}assets/images/cochise-welcome.png`,
|
||||||
|
contentUrl: `${fullUrl}assets/images/cochise-welcome.png`,
|
||||||
|
width: 940,
|
||||||
|
height: 788,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"@type": "BreadcrumbList",
|
||||||
|
"@id": `${fullUrl}#breadcrumb`,
|
||||||
|
itemListElement: [
|
||||||
|
{
|
||||||
|
"@type": "ListItem",
|
||||||
|
position: 1,
|
||||||
|
name: "Home",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"@type": "WebSite",
|
||||||
|
"@id": `${fullUrl}#website`,
|
||||||
|
url: fullUrl,
|
||||||
|
name: siteName,
|
||||||
|
description: "",
|
||||||
|
publisher: {
|
||||||
|
"@id": `${fullUrl}#organization`,
|
||||||
|
},
|
||||||
|
potentialAction: [
|
||||||
|
{
|
||||||
|
"@type": "SearchAction",
|
||||||
|
target: {
|
||||||
|
"@type": "EntryPoint",
|
||||||
|
urlTemplate: `${fullUrl}?s={search_term_string}`,
|
||||||
|
},
|
||||||
|
"query-input": {
|
||||||
|
"@type": "PropertyValueSpecification",
|
||||||
|
valueRequired: true,
|
||||||
|
valueName: "search_term_string",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
inLanguage: "en-US",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"@type": "Organization",
|
||||||
|
"@id": `${fullUrl}#organization`,
|
||||||
|
name: "Cochise Oncology",
|
||||||
|
url: fullUrl,
|
||||||
|
logo: {
|
||||||
|
"@type": "ImageObject",
|
||||||
|
inLanguage: "en-US",
|
||||||
|
"@id": `${fullUrl}#/schema/logo/image/`,
|
||||||
|
url: `${fullUrl}assets/images/cochise-welcome.png`,
|
||||||
|
contentUrl: `${fullUrl}assets/images/cochise-welcome.png`,
|
||||||
|
width: 500,
|
||||||
|
height: 195,
|
||||||
|
caption: siteName,
|
||||||
|
},
|
||||||
|
image: {
|
||||||
|
"@id": `${fullUrl}#/schema/logo/image/`,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Parallax />
|
<script type="application/ld+json" dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }} />
|
||||||
|
<HomeBgVideo />
|
||||||
<Homepage />
|
<Homepage />
|
||||||
<BeforeFooterBlock />
|
<BeforeFooterBlock />
|
||||||
</>
|
</>
|
||||||
|
@ -27,7 +27,6 @@ export default async function BlogDetail({ slug }: BlogDetailProps) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let author = {};
|
let author = {};
|
||||||
console.log("data?.data?.createdBy", data?.data?.createdBy);
|
|
||||||
if (!!data?.data?.createdBy && typeof data?.data?.createdBy !== "number") {
|
if (!!data?.data?.createdBy && typeof data?.data?.createdBy !== "number") {
|
||||||
author = {
|
author = {
|
||||||
author: {
|
author: {
|
||||||
|
@ -1,10 +1,6 @@
|
|||||||
// "use client";
|
"use client";
|
||||||
import Hero from "@/components/Hero";
|
import Hero from "@/components/Hero";
|
||||||
|
|
||||||
// const ParallaxContainer = dynamic(() => import("@/components/ParallaxContainer"), {
|
|
||||||
// ssr: false,
|
|
||||||
// });
|
|
||||||
|
|
||||||
export default function HomeBgVideo() {
|
export default function HomeBgVideo() {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
@ -17,13 +17,12 @@ export async function getDefaultMetadata(): Promise<Metadata> {
|
|||||||
"max-snippet": -1,
|
"max-snippet": -1,
|
||||||
"max-video-preview": -1,
|
"max-video-preview": -1,
|
||||||
},
|
},
|
||||||
keywords: "Cochise Oncology, Oncology, Healthcare, Medical Services, Cancer Treatment",
|
|
||||||
openGraph: {
|
openGraph: {
|
||||||
title: siteName,
|
title: siteName,
|
||||||
|
siteName,
|
||||||
type: "website",
|
type: "website",
|
||||||
locale: "en_US",
|
locale: "en_US",
|
||||||
url: fullUrl,
|
url: fullUrl,
|
||||||
siteName,
|
|
||||||
},
|
},
|
||||||
twitter: {
|
twitter: {
|
||||||
card: "summary_large_image",
|
card: "summary_large_image",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user