Skip to content
This repository was archived by the owner on Jun 19, 2025. It is now read-only.

Commit 510bac6

Browse files
feat: add canonical links to equivalent 2025 pages (#136)
## Overview This should help with SEO prioritizing the older, more established 2024 domain over 2025.
1 parent 3fc86ff commit 510bac6

5 files changed

Lines changed: 7 additions & 1 deletion

File tree

src/components/Head.astro

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
---
22
export interface Props {
3+
canonical?: string;
34
description: string;
45
title?: string;
56
}
67
7-
const { description } = Astro.props;
8+
const { canonical, description } = Astro.props;
89
910
const image = new URL("favicon.png", Astro.site).toString();
1011
@@ -98,6 +99,7 @@ const metaPairs = [
9899
<meta charset="utf-8" />
99100
<link href="/favicon.png" rel="icon" type="image/svg+xml" />
100101
<link href="/apple-touch-icon.png" rel="apple-touch-icon" sizes="180x180" />
102+
{canonical && <link rel="canonical" href={canonical} />}
101103
{metaPairs.map((meta) => <meta {...meta} />)}
102104
<meta content={description} name="description" />
103105
<meta content={keywords.join()} name="keywords" />

src/pages/about.astro

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ const brandingAssets = [
8787
---
8888

8989
<ContentLayout
90+
canonical="https://2025.squiggleconf.com/about"
9091
description="About SquiggleConf: a Boston conference focused on excellent web dev tooling."
9192
title="About Us"
9293
>

src/pages/code-of-conduct.astro

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import ContentLayout from "~/layouts/ContentLayout.astro";
55
---
66

77
<ContentLayout
8+
canonical="https://2025.squiggleconf.com/code-of-conduct"
89
description="Code of Conduct for SquiggleConf: a Boston conference focused on excellent web dev tooling."
910
title="Code of Conduct"
1011
>

src/pages/faqs.astro

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import BodyText from "~/components/BodyText.astro";
66
---
77

88
<ContentLayout
9+
canonical="https://2025.squiggleconf.com/faqs"
910
description="FAQs for SquiggleConf: a Boston conference focused on excellent web dev tooling."
1011
title="FAQs"
1112
>

src/pages/index.astro

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import ContentLayout from "~/layouts/ContentLayout.astro";
1111
---
1212

1313
<ContentLayout
14+
canonical="https://2025.squiggleconf.com"
1415
description="A Boston conference focused on excellent web dev tooling."
1516
>
1617
<PrimaryHero slot="hero" />

0 commit comments

Comments
 (0)