@@ -4,14 +4,16 @@ import '../styles/global.css';
44interface Props {
55 title? : string ;
66 description? : string ;
7+ image? : string ;
78}
89
9- const { title, description } = Astro .props ;
10+ const { title, description, image } = Astro .props ;
1011
1112const siteName = ' beparano.id' ;
1213const siteDescription = ' Personal website of Ryodari — Berlin.' ;
1314const pageTitle = title ? ` ${title } — ${siteName } ` : siteName ;
1415const pageDescription = description ?? siteDescription ;
16+ const ogImage = new URL (image ?? ' /images/avatar.JPEG' , Astro .site ).toString ();
1517
1618const navItems = [
1719 { label: ' Blog' , href: ' /blog' },
@@ -41,6 +43,20 @@ const currentPath = Astro.url.pathname;
4143 <link rel =" manifest" href =" /site.webmanifest" />
4244
4345 <link rel =" alternate" type =" application/rss+xml" title =" beparano.id" href =" /rss.xml" />
46+
47+ <!-- Open Graph -->
48+ <meta property =" og:title" content ={ pageTitle } />
49+ <meta property =" og:description" content ={ pageDescription } />
50+ <meta property =" og:url" content ={ ` https://beparano.id${currentPath } ` } />
51+ <meta property =" og:site_name" content ={ siteName } />
52+ <meta property =" og:image" content ={ ogImage } />
53+ <meta property =" og:type" content =" website" />
54+
55+ <!-- Twitter/X -->
56+ <meta name =" twitter:card" content =" summary" />
57+ <meta name =" twitter:title" content ={ pageTitle } />
58+ <meta name =" twitter:description" content ={ pageDescription } />
59+ <meta name =" twitter:image" content ={ ogImage } />
4460 </head >
4561
4662 <body class =" bg-paper text-ink flex flex-col min-h-screen" >
@@ -82,7 +98,7 @@ const currentPath = Astro.url.pathname;
8298 <span >© { new Date ().getFullYear ()} Ryodari</span >
8399 <div class =" flex gap-4" >
84100 <a
85- href =" https://github.com/ryodari/beparano.id "
101+ href =" https://github.com/ryodari/ryodari.github.io "
86102 target =" _blank"
87103 rel =" noopener noreferrer"
88104 class =" hover:text-ink transition-colors no-underline"
0 commit comments