Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/layouts/Base.astro
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ export interface Props {
datePublished?: string;
dateModified?: string;
customNavigation?: boolean;
isProduction?: boolean;
}

const getPageDates = (pathname: string) => {
Expand Down Expand Up @@ -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',
Expand All @@ -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();
Expand All @@ -72,7 +71,7 @@ import Header from '../components/Header.astro';
<title>{title}</title>

<meta name="description" content={description}>
{!isProduction && <meta name="robots" content="noindex">}
<link rel="canonical" href={canonicalURL} />
<meta property="og:title" content={title}>
<meta property="og:url" content={pageUrl}>
<meta property="og:image" content={imageUrl}>
Expand Down
Loading