Skip to content

Commit 722ff22

Browse files
committed
refactor(seo): remove canonical link functions to simplify SEO handling
1 parent f334274 commit 722ff22

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

src/utils/seo.ts

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,6 @@ export function canonicalUrl(path: string) {
5858
return `${origin}${normalizePath(path)}`
5959
}
6060

61-
export function canonicalLink(path: string) {
62-
return [{ rel: 'canonical', href: canonicalUrl(path) }]
63-
}
64-
6561
type SeoOptions = {
6662
title: string
6763
description?: string
@@ -70,22 +66,6 @@ type SeoOptions = {
7066
noindex?: boolean
7167
}
7268

73-
type HeadWithCanonical = {
74-
meta?: Array<Record<string, string | undefined>>
75-
links?: Array<{ rel: string; href: string }>
76-
}
77-
78-
export function withCanonical(path: string, head: HeadWithCanonical = {}) {
79-
return {
80-
...head,
81-
links: [...canonicalLink(path), ...(head.links ?? [])],
82-
}
83-
}
84-
85-
export function seoWithCanonical(path: string, options: SeoOptions) {
86-
return withCanonical(path, { meta: seo(options) })
87-
}
88-
8969
export const seo = ({
9070
title,
9171
description,

0 commit comments

Comments
 (0)