This commit is contained in:
1 parent
45b5af9254
commit
e0a0b188ad
3 files changed
+8
-7
No files matched your search
@@ -9,7 +9,7 @@ interface Props {
|
||||
title: string;
|
||||
description?: string;
|
||||
keywords?: string[];
|
||||
openGraph?: boolean;
|
||||
openGraph?: 'minimal' | 'generic';
|
||||
viewTransition?: boolean;
|
||||
}
|
||||
|
||||
@@ -29,12 +29,12 @@ const { title, description, keywords, openGraph, viewTransition } = Astro.props;
|
||||
<meta property="og:title" content={title} />
|
||||
{description && <meta property="og:description" content={description} />}
|
||||
<meta property="og:url" content={Astro.url.pathname} />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:image" content={logo512.src} />
|
||||
{openGraph == 'generic' && <meta property="og:type" content="website" />}
|
||||
{openGraph == 'generic' && <meta property="og:image" content={logo512.src} />}
|
||||
</>
|
||||
)}
|
||||
<slot name="head" />
|
||||
<meta name="description" content={description} />
|
||||
{description && <meta name="description" content={description} />}
|
||||
{keywords && <meta name="keywords" content={keywords.join(', ')} />}
|
||||
<base href=`${BASE_PATH}/` />
|
||||
</head>
|
||||
|
||||
@@ -8,12 +8,13 @@ interface Props {
|
||||
description?: string;
|
||||
|
||||
footer?: boolean;
|
||||
openGraph?: 'minimal' | 'generic';
|
||||
}
|
||||
|
||||
const { title, description, footer = true } = Astro.props;
|
||||
const { title, description, footer = true, openGraph = 'generic' } = Astro.props;
|
||||
---
|
||||
|
||||
<BaseLayout title={title} description={description} openGraph={true} viewTransition>
|
||||
<BaseLayout title={title} description={description} openGraph={openGraph} viewTransition>
|
||||
{Astro.slots.has('head') && <slot name="head" slot="head" />}
|
||||
<main class="min-h-[calc(100vh-3.5rem)] h-full w-full relative overflow-y-hidden">
|
||||
<slot />
|
||||
|
||||
@@ -16,7 +16,7 @@ const { title, description, width, height, duration } = metadata;
|
||||
const streamPath = `${BASE_PATH}/video/${encodeURIComponent(video.name)}/stream`;
|
||||
---
|
||||
|
||||
<WebsiteLayout title={`${title} - Video`} description={description ?? undefined}>
|
||||
<WebsiteLayout title={`${title} - Video`} description={description ?? undefined} openGraph="minimal">
|
||||
<Fragment slot="head">
|
||||
<meta property="og:type" content="video" />
|
||||
<meta property="og:video" content={streamPath} />
|
||||
|
||||
Reference in new issue
Block a user