From c023ae34dd2e6005927aa6d2a7f9edc51835bb8f Mon Sep 17 00:00:00 2001 From: Barry Pollard Date: Sun, 20 Sep 2026 22:21:05 +0100 Subject: [PATCH] Replace noindex with rel=canonical --- src/layouts/Base.astro | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/layouts/Base.astro b/src/layouts/Base.astro index 398e4a4d..cab7ff52 100644 --- a/src/layouts/Base.astro +++ b/src/layouts/Base.astro @@ -16,7 +16,6 @@ export interface Props { datePublished?: string; dateModified?: string; customNavigation?: boolean; - isProduction?: boolean; } const getPageDates = (pathname: string) => { @@ -45,6 +44,7 @@ const getPageDates = (pathname: string) => { const pageDates = getPageDates(Astro.url.pathname); const defaultDate = new Date().toISOString(); +const canonicalURL = new URL(Astro.url.pathname, Astro.site); const { title = 'HTTP Archive', @@ -57,7 +57,6 @@ const { datePublished = pageDates?.published || defaultDate, dateModified = pageDates?.modified || defaultDate, customNavigation = false, - isProduction = Astro.url.hostname === 'httparchive.org', } = Astro.props; const reports = getReports(); @@ -72,7 +71,7 @@ import Header from '../components/Header.astro'; {title} - {!isProduction && } +