forked from
quillmatiq.com/augment
Fork of Chiri for Astro for my blog
1---
2// Import the global.css file here so that it is included on
3// all pages through the use of the <BaseHead /> component.
4import { themeConfig } from '@/config'
5import type { BaseHeadProps } from '@/types/component.types'
6import 'katex/dist/katex.min.css'
7
8const canonicalURL = new URL(Astro.url.pathname, Astro.site)
9
10const { title, description, ogImage } = Astro.props as BaseHeadProps
11const imageUrl = ogImage ? new URL(ogImage, Astro.url) : new URL('/og/chiri-og.png', Astro.url)
12---
13
14<!-- Global Metadata -->
15<meta charset="utf-8" />
16<meta name="viewport" content="width=device-width,initial-scale=1" />
17<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
18<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
19<link rel="preload" href="/fonts/Inter.woff2" as="font" type="font/woff2" crossorigin="anonymous" />
20<link rel="preload" href="/fonts/Besley-Italic.woff2" as="font" type="font/woff2" crossorigin="anonymous" />
21<link rel="sitemap" href="/sitemap-index.xml" />
22<link rel="alternate" type="application/rss+xml" title={themeConfig.site.title} href={new URL('rss.xml', Astro.site)} />
23<meta name="generator" content={Astro.generator} />
24
25<!-- Canonical URL -->
26<link rel="canonical" href={canonicalURL} />
27
28<!-- Primary Meta Tags -->
29<title>
30 {title || themeConfig.site.title}
31</title>
32<meta name="title" content={title} />
33<meta name="description" content={description} />
34
35<!-- Open Graph / Facebook -->
36<meta property="og:type" content="website" />
37<meta property="og:url" content={Astro.url} />
38<meta property="og:title" content={title} />
39<meta property="og:description" content={description} />
40<meta property="og:image" content={imageUrl} />
41
42<!-- Twitter -->
43<meta property="twitter:card" content="summary_large_image" />
44<meta property="twitter:url" content={Astro.url} />
45<meta property="twitter:title" content={title} />
46<meta property="twitter:description" content={description} />
47<meta property="twitter:image" content={imageUrl} />