www: add open graph tags (#175)

This commit is contained in:
Luca Casonato
2022-04-24 22:33:55 +02:00
committed by GitHub
parent b563646c8f
commit ffbe97caca
2 changed files with 15 additions and 6 deletions
+15 -6
View File
@@ -7,6 +7,7 @@ import {
Fragment, Fragment,
h, h,
Head, Head,
PageProps,
tw, tw,
} from "../client_deps.ts"; } from "../client_deps.ts";
import Counter from "../islands/Counter.tsx"; import Counter from "../islands/Counter.tsx";
@@ -15,15 +16,23 @@ import Footer from "../components/Footer.tsx";
import WarningBanner from "../components/WarningBanner.tsx"; import WarningBanner from "../components/WarningBanner.tsx";
import { Leaf } from "../components/Icons.tsx"; import { Leaf } from "../components/Icons.tsx";
export default function MainPage() { const TITLE = "fresh - The next-gen web framework.";
const DESCRIPTION =
"Just in time edge rendering, island based interactivity, and no configuration TypeScript support using Deno.";
export default function MainPage(props: PageProps) {
const ogImageUrl = new URL(asset("/home-og.png"), props.url).href;
return ( return (
<> <>
<Head> <Head>
<title>fresh - The next-gen web framework.</title> <title>{TITLE}</title>
<meta <meta name="description" content={DESCRIPTION} />
name="description" <meta property="og:title" content={TITLE} />
content="The next-gen web framework. Just in time edge rendering, island based interactivity, and no configuration TypeScript support." <meta property="og:description" content={DESCRIPTION} />
/> <meta property="og:type" content="website" />
<meta property="og:url" content={props.url.href} />
<meta property="og:image" content={ogImageUrl} />
</Head> </Head>
<Hero /> <Hero />
<Intro /> <Intro />
Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB