-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhtml-template.js
More file actions
31 lines (25 loc) · 1.24 KB
/
Copy pathhtml-template.js
File metadata and controls
31 lines (25 loc) · 1.24 KB
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
export function getHeader(metaData) {
return `
<title>${metaData.title}</title>
<!-- Other Important Meta Tags -->
<meta name="description" content="${metaData.description}" />
<meta name="robots" content="index, follow" />
<meta name="keywords" content="${metaData.keywords}" />
<meta name="author" content="${metaData.author}" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<!-- Open Graph Meta Tags -->
<meta property="og:locale" content="en_US" />
<meta property="og:type" content="website" />
<meta property="og:title" content="${metaData.title}" />
<meta property="og:description" content="${metaData.description}" />
<meta property="og:url" content="${metaData.url}" />
<meta property="og:site_name" content="ContentKing" />
<meta property="og:image" content="${metaData.image}" />
<meta property="og:image:secure_url" content="${metaData.image}" />
<!-- Twitter Card Meta Tags -->
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content="${metaData.title}" />
<meta name="twitter:description" content="${metaData.description}" />
<meta name="twitter:image" content="${metaData.image}" />
`;
}