File size: 774 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
const formatFrontmatterToRemixMeta = (frontmatter: any) => () => {
  return [
    { title: frontmatter.meta.title },
    {
      name: 'description',
      content: frontmatter.meta.description,
    },
    { property: 'og:title', content: frontmatter.meta['og:title'] },
    {
      name: 'og:description',
      contnet: frontmatter.meta['og:description'],
    },
    {
      name: 'og:url',
      content: frontmatter.meta['og:url'],
    },
    {
      name: 'twitter:url',
      content: frontmatter.meta['twitter:url'],
    },
    {
      name: 'twitter:title',
      content: frontmatter.meta['twitter:title'],
    },
    {
      name: 'twitter:description',
      content: frontmatter.meta['twitter:description'],
    },
  ]
}

export { formatFrontmatterToRemixMeta }