feat: add og image
This commit is contained in:
parent
b2868f8691
commit
6bf6a6eea8
2 changed files with 1 additions and 26 deletions
23
index.html
23
index.html
|
@ -1,23 +0,0 @@
|
|||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Cozy 2.0</title>
|
||||
<style>
|
||||
html,
|
||||
body {
|
||||
background: black;
|
||||
color: white;
|
||||
|
||||
& a {
|
||||
color: orange;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Cozy!</h1>
|
||||
<a href="https://cozy.pub">Coming <em>back</em> sooon-ish!</a>
|
||||
</body>
|
||||
</html>
|
|
@ -8,14 +8,12 @@ interface Props {
|
|||
title: string
|
||||
description: string
|
||||
isArticle?: boolean
|
||||
image?: string
|
||||
}
|
||||
|
||||
let {
|
||||
isArticle = false,
|
||||
title,
|
||||
description = 'default description',
|
||||
image = '/cozy.jpg',
|
||||
} = Astro.props
|
||||
|
||||
description =
|
||||
|
@ -64,6 +62,6 @@ description =
|
|||
<meta property="og:url" content={Astro.url} />
|
||||
<meta property="og:title" content={title} />
|
||||
<meta property="og:description" content={description} />
|
||||
<meta property="og:image" content={new URL(image, Astro.url)} />
|
||||
<meta property="og:image" content="/touch-icon-large.png" />
|
||||
<meta property="og:site_name" content={SITE_TITLE} />
|
||||
<meta property="article:author" content={SITE_AUTHOR} />
|
||||
|
|
Loading…
Reference in a new issue