Merge pull request #300 from Malte-D/feature/og-image

Added og-image to booking pages
pull/301/head^2
Peer_Rich 2021-06-22 19:24:45 +01:00 committed by GitHub
commit c428c3f80e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -20,6 +20,8 @@ export default function User(props) {
<Head>
<title>{props.user.name || props.user.username} | Calendso</title>
<link rel="icon" href="/favicon.ico" />
<meta property="og:image" content={"https://og-image-one-pi.vercel.app/" + encodeURIComponent("Book **" + (props.user.name || props.user.username) + "**").replace(/'/g, "%27") + ".png?md=1&images=https%3A%2F%2Fcalendso.com%2Fcalendso-logo-white.svg&images=" + encodeURIComponent(props.user.avatar)} />
<meta property="og:title" content={"Book " + (props.user.name || props.user.username) + " via Calendso"}/>
</Head>
<main className="max-w-2xl mx-auto my-24">
@ -89,4 +91,4 @@ export function getRandomColorCode() {
color += Math.floor(Math.random() * 10);
}
return color;
}
}

View File

@ -96,6 +96,9 @@ export default function Type(props) {
Calendso
</title>
<link rel="icon" href="/favicon.ico" />
<meta property="og:image" content={"https://og-image-one-pi.vercel.app/" + encodeURIComponent("Book **" + (props.user.name || props.user.username) + "** <br>" + props.eventType.description).replace(/'/g, "%27") + ".png?md=1&images=https%3A%2F%2Fcalendso.com%2Fcalendso-logo-white.svg&images=" + encodeURIComponent(props.user.avatar)} />
<meta property="og:title" content={"Book " + (props.user.name || props.user.username) + " via Calendso"}/>
<meta property="og:description" content={props.eventType.description}/>
</Head>
<main
className={