MCPcopy Create free account
hub / github.com/TanStack/router / seo

Function seo

e2e/solid-start/basic-solid-query/src/utils/seo.ts:1–30  ·  view source on GitHub ↗
(params: {
  title: string
  description?: string
  keywords?: string
  image?: string
})

Source from the content-addressed store, hash-verified

1export function seo(params: {
2 title: string
3 description?: string
4 keywords?: string
5 image?: string
6}) {
7 const { title, description, keywords, image } = params
8
9 const tags = [
10 { title },
11 { name: 'description', content: description },
12 { name: 'keywords', content: keywords },
13 { name: 'twitter:title', content: title },
14 { name: 'twitter:description', content: description },
15 { name: 'twitter:creator', content: '@tannerlinsley' },
16 { name: 'twitter:site', content: '@tannerlinsley' },
17 { name: 'og:type', content: 'website' },
18 { name: 'og:title', content: title },
19 { name: 'og:description', content: description },
20 ...(image
21 ? [
22 { name: 'twitter:image', content: image },
23 { name: 'twitter:card', content: 'summary_large_image' },
24 { name: 'og:image', content: image },
25 ]
26 : []),
27 ]
28
29 return tags
30}

Callers 1

__root.tsxFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected