My personal website.
1---
2interface Props {
3 title: string;
4 banner?: string;
5 graph?: {
6 description: string;
7 type?: "website" | "article";
8 };
9}
10
11const title = "::" + Astro.props.title;
12const { banner = "https://entomoviscera.online/mainbanner.png" } = Astro.props;
13const { graph } = Astro.props;
14---
15
16<html lang="en">
17 <head>
18 <title>{title}</title>
19 <link rel="icon" type="image/png" href="/favicon.png" />
20 <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
21 <link
22 rel="alternate"
23 type="application/rss+xml"
24 title="entomoviscera.online"
25 href={new URL("rss.xml", Astro.site)}
26 />
27 <meta charset="utf-8" />
28 <meta name="viewport" content="width=device-width, initial-scale=1.0" />
29 <meta name="generator" content={Astro.generator} />
30 {
31 graph && (
32 <Fragment>
33 <meta name="description" content={graph.description} />
34 <meta property="og:title" content={title} />
35 <meta property="og:description" content={graph.description} />
36 <meta
37 property="og:url"
38 content={new URL(Astro.url.pathname.toString(), Astro.site)}
39 />
40 <meta property="og:type" content={graph.type ?? "website"} />
41 <meta property="og:image" content={banner} />
42 <meta property="twitter:card" content="summary_large_image" />
43 <meta name="twitter:title" content={title} />
44 <meta name="twitter:description" content={graph.description} />
45 <meta name="twitter:image" content={banner} />
46 </Fragment>
47 )
48 }
49 <style is:global>
50 * {
51 padding: 0;
52 margin: 0;
53 }
54
55 img {
56 max-width: 100%;
57 }
58 </style>
59 </head>
60 <body>
61 <slot />
62 </body>
63</html>