Skip to content

Commit

Permalink
fix: AstroSeo fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ebalo55 committed Sep 30, 2024
1 parent e12572e commit fad2921
Show file tree
Hide file tree
Showing 8 changed files with 148 additions and 147 deletions.
47 changes: 28 additions & 19 deletions src/layouts/Layout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@
import "@fontsource-variable/nunito";
import Header from "src/components/astro/common/header.astro";
import Footer from "src/components/astro/common/footer.astro";
import type { AstroSeoProps } from "@astrolib/seo";
import { AstroSeo } from "@astrolib/seo";
interface Props {
title: string;
JSON_LD: string;
seo: AstroSeoProps;
}
const {
title,
seo,
JSON_LD,
} = Astro.props;
---
Expand All @@ -21,12 +23,16 @@ const {
>
<head>
<!-- Google Tag Manager -->
<script is:inline async defer>
(function (w, d, s, l, i) {
<script is:inline
async
defer
>
(function(w, d, s, l, i) {
w[l] = w[l] || [];
w[l].push({
"gtm.start":
new Date().getTime(), event: "gtm.js"
new Date().getTime(),
event: "gtm.js",
});
var f = d.getElementsByTagName(s)[0],
j = d.createElement(s), dl = l != "dataLayer" ? "&l=" + l : "";
Expand All @@ -37,10 +43,10 @@ const {
</script>
<script is:inline
type="application/ld+json"
set:html={JSON_LD}
set:html={ JSON_LD }
/>
<!-- End Google Tag Manager -->
<meta charset="UTF-8"/>
<meta charset="UTF-8" />
<meta name="viewport"
content="width=device-width, initial-scale=1.0"
/>
Expand All @@ -51,19 +57,22 @@ const {
<link rel="sitemap"
href="/sitemap-index.xml"
/>
<title>{title}</title>
<AstroSeo {...seo} />
</head>
<body class="font-sans bg-white text-zinc-900">
<!-- Google Tag Manager (noscript) -->
<noscript>
<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-MZ2LDS5P"
height="0" width="0" style="display:none;visibility:hidden"></iframe>
</noscript>
<!-- End Google Tag Manager (noscript) -->
<Header/>
<main>
<slot/>
</main>
<Footer/>
<!-- Google Tag Manager (noscript) -->
<noscript>
<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-MZ2LDS5P"
height="0"
width="0"
style="display:none;visibility:hidden"
></iframe>
</noscript>
<!-- End Google Tag Manager (noscript) -->
<Header />
<main>
<slot />
</main>
<Footer />
</body>
</html>
37 changes: 18 additions & 19 deletions src/pages/career-paths/[path]/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -81,34 +81,33 @@ const json_ld = makeJsonLd<WebPage>({
});
---

<Layout title={ `CyberPath | ${ career_path }` }
JSON_LD={ json_ld }
>
<AstroSeo
title={ `CyberPath | ${ career_path }` }
canonical={ `https://cyberpath-hq.com/career-paths/${ path }` }
description={ `Explore the certification that make up the ${ career_path } career path. Find career paths, costs, and detailed info to advance your cybersecurity career.` }
openGraph={ {
url: `https://cyberpath-hq.com/career-paths/${ path }`,
title: `CyberPath | ${ career_path }`,
<Layout JSON_LD={ json_ld }
seo={ {
title: `CyberPath | ${ career_path }`,
canonical: `https://cyberpath-hq.com/career-paths/${ path }`,
description: `Explore the certification that make up the ${ career_path } career path. Find career paths, costs, and detailed info to advance your cybersecurity career.`,
openGraph: {
url: `https://cyberpath-hq.com/career-paths/${ path }`,
title: `CyberPath | ${ career_path }`,
description: `Explore the certification that make up the ${ career_path } career path. Find career paths, costs, and detailed info to advance your cybersecurity career.`,
site_name: "CyberPath",
images: [
site_name: "CyberPath",
images: [
{
url: "https://cyberpath-hq.com/CyberPath-og.webp",
width: 1920,
url: "https://cyberpath-hq.com/CyberPath-og.webp",
width: 1920,
height: 933,
alt: "CyberPath - Explore Cybersecurity Certifications",
alt: "CyberPath - Explore Cybersecurity Certifications",
},
],
} }
additionalMetaTags={ [
},
additionalMetaTags: [
{
name: "keywords",
content: `cybersecurity, certifications, career, paths, costs, info, cybersecurity career, career path, ${ career_path }`,
},
] }
/>
],
} }
>
<div class="relative isolate py-14">
<div class="absolute inset-x-0 -top-40 -z-10 transform-gpu overflow-hidden blur-3xl sm:-top-80"
aria-hidden="true"
Expand Down
37 changes: 18 additions & 19 deletions src/pages/career-paths/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -58,34 +58,33 @@ const json_ld = makeJsonLd<WebPage>({
});
---

<Layout title="CyberPath | Career paths"
JSON_LD={ json_ld }
>
<AstroSeo
title="CyberPath | Career paths"
canonical="https://cyberpath-hq.com/career-paths/"
description="Explore CyberPath’s free database of cybersecurity certifications. Find career paths, costs, and detailed info to advance your cybersecurity career."
openGraph={ {
url: "https://cyberpath-hq.com/career-paths/",
title: "CyberPath",
<Layout JSON_LD={ json_ld }
seo={ {
title: "CyberPath | Career paths",
canonical: "https://cyberpath-hq.com/career-paths/",
description: "Explore CyberPath’s free database of cybersecurity certifications. Find career paths, costs, and detailed info to advance your cybersecurity career.",
openGraph: {
url: "https://cyberpath-hq.com/career-paths/",
title: "CyberPath",
description: "Explore CyberPath’s free database of cybersecurity certifications. Find career paths, costs, and detailed info to advance your cybersecurity career.",
site_name: "CyberPath",
images: [
site_name: "CyberPath",
images: [
{
url: "https://cyberpath-hq.com/CyberPath-og.webp",
width: 1920,
url: "https://cyberpath-hq.com/CyberPath-og.webp",
width: 1920,
height: 933,
alt: "CyberPath - Explore Cybersecurity Certifications",
alt: "CyberPath - Explore Cybersecurity Certifications",
},
],
} }
additionalMetaTags={ [
},
additionalMetaTags: [
{
name: "keywords",
content: "cybersecurity, certifications, career, paths, costs, info, cybersecurity career, career paths",
},
] }
/>
],
} }
>
<div class="bg-white/50 relative isolate">
<div class="absolute inset-x-0 -top-40 -z-10 transform-gpu overflow-hidden blur-3xl sm:-top-80"
aria-hidden="true"
Expand Down
37 changes: 18 additions & 19 deletions src/pages/contributors/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -41,34 +41,33 @@ const json_ld = makeJsonLd<WebPage>({
});
---

<Layout title="CyberPath | Contributors"
JSON_LD={ json_ld }
>
<AstroSeo
title="CyberPath | Contributors"
canonical="https://cyberpath-hq.com/contributors/"
description="Contribute to CyberPath and help us build the most comprehensive database of cybersecurity certifications and trainings!"
openGraph={ {
url: "https://cyberpath-hq.com/contributors/",
title: "CyberPath | Contributors",
<Layout JSON_LD={ json_ld }
seo={ {
title: "CyberPath | Contributors",
canonical: "https://cyberpath-hq.com/contributors/",
description: "Contribute to CyberPath and help us build the most comprehensive database of cybersecurity certifications and trainings!",
openGraph: {
url: "https://cyberpath-hq.com/contributors/",
title: "CyberPath | Contributors",
description: "Contribute to CyberPath and help us build the most comprehensive database of cybersecurity certifications and trainings!",
site_name: "CyberPath",
images: [
site_name: "CyberPath",
images: [
{
url: "https://cyberpath-hq.com/CyberPath-og.webp",
width: 1920,
url: "https://cyberpath-hq.com/CyberPath-og.webp",
width: 1920,
height: 933,
alt: "CyberPath - Explore Cybersecurity Certifications",
alt: "CyberPath - Explore Cybersecurity Certifications",
},
],
} }
additionalMetaTags={ [
},
additionalMetaTags: [
{
name: "keywords",
content: "cybersecurity, certifications, training, contribute, contribute to CyberPath, cybersecurity certifications, cybersecurity training",
},
] }
/>
],
} }
>
<div class="relative isolate overflow-hidden bg-white px-6 py-24 sm:py-32 lg:overflow-visible lg:px-0">
<div class="absolute inset-0 -z-10 overflow-hidden">
<svg class="absolute left-[max(50%,25rem)] top-0 h-[64rem] w-[128rem] -translate-x-1/2 stroke-gray-200 [mask-image:radial-gradient(64rem_64rem_at_top,white,transparent)]"
Expand Down
24 changes: 11 additions & 13 deletions src/pages/database/[provider]/[title]/index.astro
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
import { AstroSeo } from "@astrolib/seo";
import Layout from "@layouts/Layout.astro";
import { getCollection } from "astro:content";
import CertBanner from "@components/astro/database/cert-banner.astro";
Expand Down Expand Up @@ -75,14 +74,12 @@ const json_ld = makeJsonLd<WebPage>({
});
---

<Layout title={ `CyberPath | ${ certification.data.title }` }
JSON_LD={ json_ld }
>
<AstroSeo
title={ `CyberPath | ${ certification.data.title }` }
canonical={ `https://cyberpath-hq.com/database/${ certification.slug }` }
description={ `Learn more about the ${ certification.data.title } certification, including career paths, costs, and more.` }
openGraph={ {
<Layout JSON_LD={ json_ld }
seo={ {
title: `CyberPath | ${ certification.data.title }`,
description: `Learn more about the ${ certification.data.title } certification, including career paths, costs, and more.`,
canonical: `https://cyberpath-hq.com/database/${ certification.slug }`,
openGraph: {
url: `https://cyberpath-hq.com/database/${ certification.slug }`,
title: `CyberPath | ${ certification.data.title }`,
description: `Learn more about the ${ certification.data.title } certification, including career paths, costs, and more.`,
Expand All @@ -95,14 +92,15 @@ const json_ld = makeJsonLd<WebPage>({
alt: "CyberPath - Explore Cybersecurity Certifications",
},
],
} }
additionalMetaTags={ [
},
additionalMetaTags: [
{
name: "keywords",
content: `cybersecurity, certifications, career, paths, costs, info, cybersecurity career, ${ certification.data.title }, ${ certification.data.acronym }, ${ provider }`,
},
] }
/>
],
} }
>
<div class="pb-24 grid grid-cols-1 lg:grid-cols-12 relative isolate">
<div class="absolute inset-x-0 -top-40 -z-10 transform-gpu overflow-hidden blur-3xl sm:-top-80"
aria-hidden="true"
Expand Down
37 changes: 18 additions & 19 deletions src/pages/database/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -41,34 +41,33 @@ const json_ld = makeJsonLd<WebPage>({
});
---

<Layout title="CyberPath | Database"
JSON_LD={ json_ld }
>
<AstroSeo
title="CyberPath | Database"
canonical="https://cyberpath-hq.com/database/"
description="Access the full database of certifications and exams. Search, filter, and sort the data to find the information you need, remember, it's Free!"
openGraph={ {
url: "https://cyberpath-hq.com/database/",
title: "CyberPath | Database",
<Layout JSON_LD={ json_ld }
seo={ {
title: "CyberPath | Database",
canonical: "https://cyberpath-hq.com/database/",
description: "Access the full database of certifications and exams. Search, filter, and sort the data to find the information you need, remember, it's Free!",
openGraph: {
url: "https://cyberpath-hq.com/database/",
title: "CyberPath | Database",
description: "Access the full database of certifications and exams. Search, filter, and sort the data to find the information you need, remember, it's Free!",
site_name: "CyberPath",
images: [
site_name: "CyberPath",
images: [
{
url: "https://cyberpath-hq.com/CyberPath-og.webp",
width: 1920,
url: "https://cyberpath-hq.com/CyberPath-og.webp",
width: 1920,
height: 933,
alt: "CyberPath - Explore Cybersecurity Certifications",
alt: "CyberPath - Explore Cybersecurity Certifications",
},
],
} }
additionalMetaTags={ [
},
additionalMetaTags: [
{
name: "keywords",
content: "cybersecurity, certifications, exams, database, search, filter, sort, free",
},
] }
/>
],
} }
>
<div class="relative isolate py-14">
<div class="absolute inset-x-0 -top-40 -z-10 transform-gpu overflow-hidden blur-3xl sm:-top-80"
aria-hidden="true"
Expand Down
37 changes: 18 additions & 19 deletions src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -42,34 +42,33 @@ const json_ld = makeJsonLd<WebPage>({
});
---

<Layout title="CyberPath | Explore Cybersecurity Certifications"
JSON_LD={ json_ld }
>
<AstroSeo
title="CyberPath | Explore Cybersecurity Certifications"
canonical="https://cyberpath-hq.com/"
description="Explore CyberPath’s free database of cybersecurity certifications. Find career paths, costs, and detailed info to advance your cybersecurity career."
openGraph={ {
url: "https://cyberpath-hq.com/",
<Layout JSON_LD={ json_ld }
seo={ {
title: "CyberPath | Explore Cybersecurity Certifications",
canonical: "https://cyberpath-hq.com/",
description: "Explore CyberPath’s free database of cybersecurity certifications. Find career paths, costs, and detailed info to advance your cybersecurity career.",
openGraph: {
url: "https://cyberpath-hq.com/",
title: "CyberPath | Explore Cybersecurity Certifications",
description: "Explore CyberPath’s free database of cybersecurity certifications. Find career paths, costs, and detailed info to advance your cybersecurity career.",
site_name: "CyberPath",
images: [
site_name: "CyberPath",
images: [
{
url: "https://cyberpath-hq.com/CyberPath-og.webp",
width: 1920,
url: "https://cyberpath-hq.com/CyberPath-og.webp",
width: 1920,
height: 933,
alt: "CyberPath - Explore Cybersecurity Certifications",
alt: "CyberPath - Explore Cybersecurity Certifications",
},
],
} }
additionalMetaTags={ [
},
additionalMetaTags: [
{
name: "keywords",
name: "keywords",
content: "cybersecurity, certifications, career, paths, costs, info, cybersecurity career",
},
] }
/>
],
} }
>
<Hero />
<Newsletter />
<Faq />
Expand Down
Loading

0 comments on commit fad2921

Please sign in to comment.