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="generator" content={Astro.generator} /> 22 { 23 graph && ( 24 <Fragment> 25 <meta name="description" content={graph.description} /> 26 <meta property="og:title" content={title} /> 27 <meta property="og:description" content={graph.description} /> 28 <meta property="og:url" content={graph.url} /> 29 <meta property="og:type" content={graph.type ?? "website"} /> 30 <meta property="og:image" content={graph.image} /> 31 </Fragment> 32 ) 33 } 34 </head> 35 <body> 36 <slot /> 37 </body> 38</html>