My personal website.
1---
2interface Props {
3 title: string;
4 graph?: {
5 description: string;
6 url?: string;
7 type?: "website" | "article";
8 image?: string;
9 };
10}
11
12const title = "::" + Astro.props.title;
13const { graph } = Astro.props;
14---
15
16<html lang="en">
17 <head>
18 <title>{title}</title>
19 <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
20 <meta charset="utf-8" />
21 <meta name="viewport" content="width=device-width, initial-scale=1.0" />
22 <meta name="generator" content={Astro.generator} />
23 {
24 graph && (
25 <Fragment>
26 <meta name="description" content={graph.description} />
27 <meta property="og:title" content={title} />
28 <meta property="og:description" content={graph.description} />
29 <meta property="og:url" content={graph.url} />
30 <meta property="og:type" content={graph.type ?? "website"} />
31 <meta property="og:image" content={graph.image} />
32 </Fragment>
33 )
34 }
35 <style is:global>
36 * {
37 padding: 0;
38 margin: 0;
39 }
40
41 img {
42 max-width: 100%;
43 }
44 </style>
45 </head>
46 <body>
47 <slot />
48 </body>
49</html>