on cd2ddb3 help sign in
35 lines 1.2 kB history raw
1export default function Meta(post, disableImage, large = false) {
2 const author = post?.extra?.author || "urbit.org";
3 const title = post?.title ? post.title : "";
4 const description =
5 post?.description || "Urbit is a personal server built from scratch.";
6 const image =
7 post?.extra?.image ||
8 post?.image ||
9 "https://media.urbit.org/logo/urbit-logo-card.png";
10 return (
11 <>
12 <link rel="icon" type="image/png" href="/images/favicon.ico" />
13 <meta
14 name="twitter:card"
15 content={large ? "summary_large_image" : "summary"}
16 key="twitter-card"
17 />
18 <meta name="twitter:site" content="@urbit" key="twitter-site" />
19 <meta name="twitter:creator" content="@urbit" key="twitter-creator" />
20 <meta name="og:title" content={title} key="title" />
21 <meta name="og:description" content={description} key="description" />
22 <meta name="description" content={description} />
23 <meta name="author" content={author} key="author" />
24 {!disableImage && (
25 <meta name="twitter:image" content={image} key="image" />
26 )}
27 <link
28 rel="alternative"
29 type="application/rss+xml"
30 title="RSS"
31 href="/rss.xml"
32 />
33 </>
34 );