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

Function seo

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

Source from the content-addressed store, hash-verified

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

Callers 1

__root.tsxFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected