-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBaseHead.astro
More file actions
97 lines (84 loc) · 3.23 KB
/
Copy pathBaseHead.astro
File metadata and controls
97 lines (84 loc) · 3.23 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
---
interface Props {
title: string;
description?: string;
image?: string;
canonicalUrl?: string;
type?: 'website' | 'article';
publishedTime?: string;
}
const {
title,
description = 'In respect and admiration, to the spirit that lives in the computer.',
image = '/images/id/id.png',
canonicalUrl = Astro.url.href,
type = 'website',
publishedTime,
} = Astro.props;
const siteTitle = 'rockoder';
const fullTitle = title === siteTitle ? title : `${title} | ${siteTitle}`;
---
<!-- Global Metadata -->
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="generator" content={Astro.generator} />
<!-- Favicon -->
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon.png" />
<!-- Primary Meta Tags -->
<title>{fullTitle}</title>
<meta name="title" content={fullTitle} />
<meta name="description" content={description} />
<meta name="author" content="Ganesh Pagade" />
<!-- Canonical URL -->
<link rel="canonical" href={canonicalUrl} />
<!-- Open Graph / Facebook -->
<meta property="og:type" content={type} />
<meta property="og:url" content={canonicalUrl} />
<meta property="og:title" content={fullTitle} />
<meta property="og:description" content={description} />
<meta property="og:image" content={new URL(image, Astro.site)} />
<meta property="og:site_name" content={siteTitle} />
{publishedTime && <meta property="article:published_time" content={publishedTime} />}
<!-- Twitter -->
<meta property="twitter:card" content="summary_large_image" />
<meta property="twitter:url" content={canonicalUrl} />
<meta property="twitter:title" content={fullTitle} />
<meta property="twitter:description" content={description} />
<meta property="twitter:image" content={new URL(image, Astro.site)} />
<meta property="twitter:site" content="@rockoder" />
<meta property="twitter:creator" content="@rockoder" />
<!-- Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link rel="preload" as="font" type="font/woff2" href="https://fonts.gstatic.com/s/inter/v20/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa1ZL7.woff2" crossorigin />
<!-- RSS Feed -->
<link rel="alternate" type="application/rss+xml" title="rockoder RSS Feed" href="/rss.xml" />
<!-- Sitemap -->
<link rel="sitemap" href="/sitemap-index.xml" />
<!-- Google Analytics 4 -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-H2HES275P8"></script>
<script is:inline>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-H2HES275P8');
</script>
<!-- Structured Data: WebSite -->
<script type="application/ld+json" set:html={JSON.stringify({
"@context": "https://schema.org",
"@type": "WebSite",
"name": siteTitle,
"url": "https://www.rockoder.com",
"description": "In respect and admiration, to the spirit that lives in the computer.",
"author": {
"@type": "Person",
"name": "Ganesh Pagade",
"url": "https://www.rockoder.com/about/",
"sameAs": [
"https://twitter.com/rockoder",
"https://github.com/rockoder",
"https://linkedin.com/in/rockoder"
]
}
})} />