From 7ae1591661a8842b68e8ba0e1ad098a7ced76322 Mon Sep 17 00:00:00 2001 From: Daveed Date: Sat, 4 Oct 2025 04:19:02 -0400 Subject: [PATCH 1/6] creating /about page --- src/layouts/BaseLayout.astro | 102 ++++--- src/layouts/LandingLayout.astro | 173 +++++++----- src/pages/about/index.astro | 464 ++++++++++++++++++++++++++++++++ src/pages/index.astro | 44 +-- 4 files changed, 669 insertions(+), 114 deletions(-) create mode 100644 src/pages/about/index.astro diff --git a/src/layouts/BaseLayout.astro b/src/layouts/BaseLayout.astro index a82ff27..fb1760d 100644 --- a/src/layouts/BaseLayout.astro +++ b/src/layouts/BaseLayout.astro @@ -1,6 +1,6 @@ --- import "../styles/base.css"; -import Posthog from '../components/posthog.astro'; +import Posthog from "../components/posthog.astro"; export interface Props { title?: string; @@ -8,7 +8,7 @@ export interface Props { image?: string; canonical?: string; noindex?: boolean; - type?: 'website' | 'article' | 'product'; + type?: "website" | "article" | "product"; publishedTime?: string; modifiedTime?: string; author?: string; @@ -26,7 +26,7 @@ const { image = "/favicon.svg", canonical, noindex = false, - type = 'website', + type = "website", publishedTime, modifiedTime, author, @@ -35,29 +35,30 @@ const { alternateLocales = [], structuredData, className = "", - favicon = '/favicon.png' + favicon = "/favicon.png", } = Astro.props; // Get the canonical URL - use provided canonical or current URL const canonicalURL = canonical || new URL(Astro.url.pathname, Astro.site); // Ensure image is absolute URL -const absoluteImage = image?.startsWith('http') +const absoluteImage = image?.startsWith("http") ? image : new URL(image, Astro.site); // Generate structured data for SEO const defaultStructuredData = { "@context": "https://schema.org", - "@type": type === 'article' ? "Article" : type === 'product' ? "Product" : "WebSite", - "name": title, - "description": description, - "url": canonicalURL, - ...(image && { "image": absoluteImage }), - ...(author && { "author": { "@type": "Person", "name": author } }), - ...(publishedTime && { "datePublished": publishedTime }), - ...(modifiedTime && { "dateModified": modifiedTime }), - ...(siteName && { "publisher": { "@type": "Organization", "name": siteName } }) + "@type": + type === "article" ? "Article" : type === "product" ? "Product" : "WebSite", + name: title, + description: description, + url: canonicalURL, + ...(image && { image: absoluteImage }), + ...(author && { author: { "@type": "Person", name: author } }), + ...(publishedTime && { datePublished: publishedTime }), + ...(modifiedTime && { dateModified: modifiedTime }), + ...(siteName && { publisher: { "@type": "Organization", name: siteName } }), }; const finalStructuredData = structuredData || defaultStructuredData; @@ -86,11 +87,21 @@ const finalStructuredData = structuredData || defaultStructuredData; - {alternateLocales.map(({ locale: altLocale, url }) => ( - - ))} - {publishedTime && } - {modifiedTime && } + { + alternateLocales.map(({ locale: altLocale, url }) => ( + + )) + } + { + publishedTime && ( + + ) + } + { + modifiedTime && ( + + ) + } {author && } @@ -113,12 +124,17 @@ const finalStructuredData = structuredData || defaultStructuredData; /> - {alternateLocales.map(({ locale: altLocale, url }) => ( - - ))} + { + alternateLocales.map(({ locale: altLocale, url }) => ( + + )) + } -